Skip to content

Commit

Permalink
chore(update-configs): eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem committed Apr 8, 2024
1 parent 694203c commit eceb58a
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
// @ts-check

import eslint from '@eslint/js'
import eslintPlugin from 'eslint-plugin-eslint-plugin'
import nodePlugin from 'eslint-plugin-n'
import stylistic from '@stylistic/eslint-plugin'
import tseslint from 'typescript-eslint'
import babelParser from '@babel/eslint-parser'
import vitest from 'eslint-plugin-vitest'

export default [
{
languageOptions: {
parser: babelParser,
parserOptions: {
requireConfigFile: false,
sourceType: 'module',
babelOptions: {
babelrc: false,
configFile: false,
presets: ['@babel/preset-env'],
},
},
files: ['tests/**'], // or any other pattern
plugins: {
vitest
},
},
...tseslint.config(eslint.configs.recommended,
...tseslint.configs.recommended),
eslintPlugin.configs['flat/recommended'],
nodePlugin.configs['flat/recommended-script'],
stylistic.configs.customize({
quotes: 'single',
semi: false,
commaDangle: 'always-multiline',
}),
rules: {
...vitest.configs.recommended.rules
},
languageOptions: {
globals: {
...vitest.environments.env.globals
}
}
}
]

0 comments on commit eceb58a

Please sign in to comment.