-
Notifications
You must be signed in to change notification settings - Fork 1
feat(eslint): Add support for flat eslint v9 #204
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c95d3a0
Chore(repo): Update ESLint to v9 and migrate to flat config #191
Kothy dc49683
BREAKING CHANGES(eslint-config-base): Update ESLint to v9 and migrate…
Kothy 353626b
BREAKING CHANGES(eslint-config-react): Update ESLint to v9 and migrat…
Kothy 9a80021
BREAKING CHANGES(eslint-config-typescript): Update ESLint to v9 and m…
Kothy 2e47bcd
BREAKING CHANGES(eslint-config-jest): Update ESLint to v9 and migrate…
Kothy 249a845
Style(conventional-changelog): Fixes format and eslint errors #191
Kothy b2d7d13
Style(stylelint-config): Fixes format and eslint errors #191
Kothy 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
|
@@ -29,3 +29,4 @@ nbproject | |
*.atom-* | ||
.tern-* | ||
jsconfig.json | ||
.yarn |
This file contains hidden or 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 +1 @@ | ||
18.20.8 | ||
20.12.0 |
This file contains hidden or 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,3 +1,4 @@ | ||
import prettierConfig from './packages/prettier-config/index.js'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import prettierConfig from '@alma-oss/prettier-config'; | ||
|
||
export default prettierConfig; |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* eslint-disable import/no-relative-packages */ | ||
|
||
import prettierConfig from 'eslint-config-prettier'; | ||
import baseConfig from './packages/eslint-config-base/index.js'; | ||
import optionalBaseConfig from './packages/eslint-config-base/optional.js'; | ||
import jestConfig from './packages/eslint-config-jest/index.js'; | ||
|
||
export default [ | ||
...baseConfig, | ||
...optionalBaseConfig, | ||
...jestConfig, | ||
{ | ||
ignores: ['node_modules', '!.*.js', '**/*.mjs', '.yarn/**', '**/.remarkrc.mjs'], | ||
|
||
rules: { | ||
// Disabled because off node do not resolve | ||
'import/extensions': 'off', | ||
}, | ||
}, | ||
prettierConfig, | ||
]; |
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
packages/conventional-changelog-lmc-bitbucket/tests/index.test.js
This file contains hidden or 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 hidden or 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
3 changes: 1 addition & 2 deletions
3
packages/conventional-changelog-lmc-github/tests/index.test.js
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import base from './index.js'; | ||
|
||
export default [ | ||
...base, | ||
{ | ||
rules: { | ||
// disable requiring trailing commas because it might be nice to revert to | ||
// being JSON at some point, and I don't want to make big changes now. | ||
'comma-dangle': 0, | ||
|
||
'max-len': 0, | ||
|
||
// Disabled because off node do not resolve | ||
'import/extensions': 'off', | ||
}, | ||
}, | ||
]; |
This file contains hidden or 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,4 +1,4 @@ | ||
module.exports = { | ||
export default { | ||
// Test files patterns | ||
tests: ['test/**', '**/*.test.*', '**/*.spec.*'], | ||
|
||
|
This file contains hidden or 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,38 +1,42 @@ | ||
const globs = require('./globs'); | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import { fixupConfigRules } from '@eslint/compat'; | ||
import bestPractices from './rules/best-practices.js'; | ||
import errors from './rules/errors.js'; | ||
import node from './rules/node.js'; | ||
import style from './rules/style.js'; | ||
import variables from './rules/variables.js'; | ||
import es6 from './rules/es6.js'; | ||
import importsRules from './rules/imports.js'; | ||
import strict from './rules/strict.js'; | ||
import globs from './globs.js'; | ||
import settings from './settings.js'; | ||
|
||
module.exports = { | ||
plugins: ['import'], | ||
const compat = new FlatCompat(); | ||
|
||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.mjs', '.cjs', '.js', '.json', '.node'], | ||
}, | ||
}, | ||
}, | ||
|
||
extends: [ | ||
'eslint-config-airbnb-base', | ||
'./rules/best-practices', | ||
'./rules/errors', | ||
'./rules/node', | ||
'./rules/style', | ||
'./rules/variables', | ||
'./rules/es6', | ||
'./rules/imports', | ||
'./rules/strict', | ||
].map(require.resolve), | ||
export default [ | ||
...fixupConfigRules(compat.extends('eslint-config-airbnb-base')), | ||
{ | ||
name: '@lmc-eu/eslint-config-base', | ||
|
||
rules: {}, | ||
settings, | ||
|
||
overrides: [ | ||
{ | ||
files: globs.configs, | ||
rules: {}, | ||
}, | ||
bestPractices, | ||
errors, | ||
node, | ||
style, | ||
variables, | ||
es6, | ||
importsRules, | ||
strict, | ||
{ | ||
files: globs.configs, | ||
|
||
rules: { | ||
// Using process.env is encouraged in configuration files | ||
'node/no-process-env': 'off', | ||
}, | ||
rules: { | ||
// Using process.env is encouraged in configuration files | ||
// @see: https://eslint.org/docs/latest/rules/no-process-env | ||
'node/no-process-env': 'off', | ||
}, | ||
], | ||
}; | ||
}, | ||
]; |
This file contains hidden or 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,4 +1,15 @@ | ||
module.exports = { | ||
extends: ['eslint-config-airbnb-base/legacy'].map(require.resolve), | ||
rules: {}, | ||
}; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import { fixupConfigRules } from '@eslint/compat'; | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}); | ||
|
||
export default [ | ||
...fixupConfigRules(compat.extends('eslint-config-airbnb-base/legacy')), | ||
{ | ||
name: '@lmc-eu/eslint-config-base/legacy', | ||
|
||
rules: {}, | ||
}, | ||
]; |
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.
Uh oh!
There was an error while loading. Please reload this page.