-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from etn-ccis/feature/blui-6228-eslint-9
Upgrade ESlint version 9 support flat config
- Loading branch information
Showing
6 changed files
with
328 additions
and
406 deletions.
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
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.