Skip to content

Commit

Permalink
* Update config for json to use flat config too
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Oct 1, 2024
1 parent 8c61432 commit 115a182
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions eslint.json.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url'
import { FlatCompat } from '@eslint/eslintrc'
import js from '@eslint/js'
import jsoncEslintParser from 'jsonc-eslint-parser'
import eslintPluginJsonc from 'eslint-plugin-jsonc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
Expand All @@ -13,10 +14,8 @@ const compat = new FlatCompat({
})

export default [
...compat.extends(
'plugin:jsonc/base',
).map(config => ({
...config,
...eslintPluginJsonc.configs['flat/base'],
{
files: ['**/*.json'],
ignores: [
'**/node_modules',
Expand All @@ -32,5 +31,5 @@ export default [
'no-tabs': 'off',
'comma-spacing': 'off',
},
})),
},
]

0 comments on commit 115a182

Please sign in to comment.