-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (47 loc) · 1.42 KB
/
eslint.config.js
File metadata and controls
48 lines (47 loc) · 1.42 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
39
40
41
42
43
44
45
46
47
48
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import jest from 'eslint-plugin-jest';
import nodeRecommended from 'eslint-plugin-n/configs/recommended-module.js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import ts from 'typescript-eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: ['coverage', 'node_modules', 'dist', 'src/test/**/*.ts', 'rollup.config.js'],
},
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
js.configs.recommended,
nodeRecommended,
jest.configs['flat/recommended'],
eslintConfigPrettier,
eslintPluginPrettierRecommended,
...ts.configs.recommended,
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'n/no-extraneous-import': [
'error',
{
allowModules: ['@jest/globals'],
},
],
'n/no-missing-import': 'off',
'n/no-process-exit': 'off',
'n/no-unpublished-import': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
files: ['test/**/*.js'],
rules: {
'no-global-assign': 'off',
},
},
];