1- // @ts -check
2-
31import type { Linter } from 'eslint'
42
3+ import { defineConfig , globalIgnores } from 'eslint/config'
4+
5+ import globals from 'globals'
56import eslintPluginJs from '@eslint/js'
6- import eslintPluginJsonc from 'eslint-plugin-jsonc'
7- import eslintPluginPackageJson from 'eslint-plugin-package-json/configs/recommended'
87import eslintPluginYml from 'eslint-plugin-yml'
9- import globals from 'globals'
8+ import eslintPluginJsonc from 'eslint-plugin-jsonc'
9+ import eslintPluginPackageJson from 'eslint-plugin-package-json'
1010import neostandard , { plugins as eslintPlugins , resolveIgnoresFromGitignore } from 'neostandard'
1111
12- export default [
13- { ignores : resolveIgnoresFromGitignore ( ) } ,
14- { languageOptions : { globals : { ...globals . browser , ... globals . node } } } ,
12+ export default defineConfig ( [
13+ globalIgnores ( resolveIgnoresFromGitignore ( ) ) ,
14+ { languageOptions : { globals : { ...globals . node } } } ,
1515 eslintPluginJs . configs . recommended ,
16- ... neostandard ( {
16+ neostandard ( {
1717 noJsx : true ,
1818 ts : true
1919 } ) ,
2020 eslintPlugins . promise . configs [ 'flat/recommended' ] ,
2121 eslintPlugins [ '@stylistic' ] . configs [ 'recommended-flat' ] ,
2222 eslintPlugins . n . configs [ 'flat/recommended' ] ,
23- ... eslintPluginJsonc . configs [ 'flat/recommended-with-json' ] ,
24- eslintPluginPackageJson ,
25- ... eslintPluginYml . configs [ 'flat/recommended' ] ,
23+ eslintPluginJsonc . configs [ 'flat/recommended-with-json' ] ,
24+ eslintPluginPackageJson . configs . recommended ,
25+ eslintPluginYml . configs [ 'flat/recommended' ] ,
2626 {
2727 rules : {
2828 '@stylistic/brace-style' : [ 'error' , '1tbs' , { allowSingleLine : true } ] ,
@@ -45,4 +45,4 @@ export default [
4545 'yml/quotes' : [ 'error' , { prefer : 'double' } ]
4646 }
4747 }
48- ] satisfies Linter . Config [ ]
48+ ] ) as Linter . Config [ ]
0 commit comments