Skip to content

Commit 5011836

Browse files
fix eslint flat config
1 parent 0ab215d commit 5011836

File tree

5 files changed

+747
-1288
lines changed

5 files changed

+747
-1288
lines changed

eslint.config.js renamed to eslint.config.mjs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const eslintJs = require('@eslint/js')
2-
const github = require('eslint-plugin-github')
3-
const globals = require('globals')
4-
const pluginJest = require('eslint-plugin-jest')
1+
import eslintJs from '@eslint/js'
2+
import github from 'eslint-plugin-github'
3+
import globals from 'globals'
4+
import pluginJest from 'eslint-plugin-jest'
55

6-
module.exports = [
6+
const config = [
77
github.getFlatConfigs().recommended,
88
eslintJs.configs.recommended,
99
{
@@ -17,7 +17,7 @@ module.exports = [
1717
},
1818
},
1919
rules: {
20-
'importPlugin/no-commonjs': 'off',
20+
'import/no-commonjs': 'off',
2121
'no-shadow': 'off',
2222
'no-unused-vars': [
2323
'error',
@@ -37,16 +37,11 @@ module.exports = [
3737
},
3838
},
3939
{
40-
files: ['.eslint.config.js', '.markdownlint-cli2.cjs'],
40+
files: ['.markdownlint-cli2.cjs'],
4141
rules: {
42-
'filenames/match-regex': 'off',
4342
'github/filenames-match-regex': 'off',
4443
},
4544
},
46-
{
47-
files: ['src/url.js', 'src/rules/new-color-css-vars.js'],
48-
rules: {
49-
'importPlugin/extensions': 'off',
50-
},
51-
},
5245
]
46+
47+
export default config

0 commit comments

Comments
 (0)