-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade ESlint version 9 support flat config #116
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4bbdce4
Upgade ESlint version 9
JeffGreiner-eaton d302eea
update no-unused-expressions
JeffGreiner-eaton 2867ac6
remove rule no-unused-expressions
JeffGreiner-eaton 3299260
update configs to support flat config
JeffGreiner-eaton 9f07661
update configs
JeffGreiner-eaton f141df8
update change log
JeffGreiner-eaton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@brightlayer-ui/eslint-config", | ||
"version": "3.0.1", | ||
"version": "4.0.0-alpha.0", | ||
"description": "ESLint profile for Brightlayer UI", | ||
"author": "Brightlayer UI <[email protected]>", | ||
"main": "index.js", | ||
|
@@ -30,16 +30,18 @@ | |
"prettier": "prettier \"**/**.{ts,tsx,js,jsx,json,css,scss,html,md}\" --write" | ||
}, | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.9.0", | ||
"eslint": ">= 8.6.0", | ||
"typescript": ">= 4.0.0" | ||
"typescript": "5.5.4" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/parser": "^5.9.0", | ||
"eslint-config-prettier": ">= 8.0.0" | ||
"@eslint/js": "^9.13.0", | ||
"typescript-eslint": "^8.11.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-config-prettier":"^9.1.0", | ||
"@typescript-eslint/parser": "^8.10.0", | ||
"eslint": ">= 9.12.0" | ||
}, | ||
"optionalDependencies": { | ||
"eslint-plugin-react": "^7.28.0" | ||
"eslint-plugin-react": "^7.37.1" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
|
@@ -51,10 +53,8 @@ | |
"prettier": "@brightlayer-ui/prettier-config", | ||
"devDependencies": { | ||
"@brightlayer-ui/prettier-config": "^1.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.9.0", | ||
"eslint": ">= 8.6.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react": "^7.37.1", | ||
"prettier": "3.2.5", | ||
"typescript": ">= 4.0.0" | ||
"typescript": "5.5.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
const tsProfile = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'eslint-config-prettier', | ||
], | ||
rules: require('./blui-rules'), | ||
}; | ||
const js = require('@eslint/js'); | ||
const tseslint = require('typescript-eslint'); | ||
const prettierRecommended = require('eslint-plugin-prettier/recommended'); | ||
const typescriptEslintParser = require('@typescript-eslint/parser'); | ||
const bluiRules = require('./blui-rules.js'); | ||
|
||
module.exports = tsProfile; | ||
module.exports = [ | ||
js.configs.recommended, | ||
tseslint.configs.eslintRecommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
prettierRecommended, | ||
{ | ||
languageOptions: { | ||
parser: typescriptEslintParser | ||
}, | ||
rules: { | ||
...bluiRules | ||
}, | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
const tsxProfile = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'eslint-config-prettier', | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
const js = require('@eslint/js'); | ||
const reactRecommened = require('eslint-plugin-react/configs/recommended.js'); | ||
const tseslint = require('typescript-eslint'); | ||
const prettierRecommended = require('eslint-plugin-prettier/recommended'); | ||
const typescriptEslintParser = require('@typescript-eslint/parser'); | ||
const bluiRules = require('./blui-rules.js'); | ||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
tseslint.configs.eslintRecommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
reactRecommened, | ||
prettierRecommended, | ||
{ | ||
languageOptions: { | ||
parser: typescriptEslintParser | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}, | ||
rules: Object.assign( | ||
{ | ||
rules: { | ||
'react/prop-types': 'off', | ||
'react/display-name': 'off', | ||
...bluiRules | ||
}, | ||
require('./blui-rules') | ||
), | ||
}; | ||
|
||
module.exports = tsxProfile; | ||
} | ||
]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run prettier? There's mismatched single/double quotes convention.