-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
38 lines (37 loc) · 1.17 KB
/
eslint.config.mjs
File metadata and controls
38 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// @ts-check
import esPlugin from '@eslint/js'
import tsPlugin from 'typescript-eslint'
import stylisticTsPlugin from '@stylistic/eslint-plugin-ts'
import jestPlugin from 'eslint-plugin-jest'
export default tsPlugin.config(
{
ignores: ['docs', 'dist', 'node_modules'],
},
{
files: ['tests/**/*.ts', 'lib/**/*.ts'],
extends: [
esPlugin.configs.recommended,
tsPlugin.configs.recommended,
jestPlugin.configs['flat/recommended'],
stylisticTsPlugin.configs['all-flat']
],
languageOptions: {
globals: jestPlugin.environments.globals.globals,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
}
},
rules: {
'no-unused-vars': 'off',
'newline-per-chained-call': 'off',
'jest/prefer-importing-jest-globals': 'error',
'jest/no-disabled-tests': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@stylistic/ts/semi': ['error', 'never'],
'@stylistic/ts/indent': ['error', 2],
'@stylistic/ts/object-curly-spacing': ['error', 'always'],
'@stylistic/ts/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }]
}
}
)