Commit | Line | Data |
---|---|---|
66a7748d JB |
1 | // eslint-disable-next-line n/no-unpublished-require |
2 | const { defineConfig } = require('eslint-define-config') | |
3 | ||
4 | module.exports = defineConfig({ | |
5 | root: true, | |
6 | env: { | |
7 | es2022: true, | |
8 | node: true | |
9 | }, | |
10 | parserOptions: { | |
4c3f6c20 JB |
11 | sourceType: 'module', |
12 | ecmaVersion: 2022 | |
66a7748d | 13 | }, |
b00a1ee1 | 14 | plugins: ['simple-import-sort'], |
66a7748d JB |
15 | extends: ['eslint:recommended', 'plugin:import/recommended'], |
16 | settings: { | |
17 | 'import/resolver': { | |
18 | typescript: { | |
19 | project: './tsconfig.json' | |
20 | } | |
21 | } | |
22 | }, | |
23 | rules: { | |
4c3f6c20 JB |
24 | 'simple-import-sort/imports': 'error', |
25 | 'simple-import-sort/exports': 'error' | |
66a7748d JB |
26 | }, |
27 | overrides: [ | |
28 | { | |
29 | files: ['**/*.ts'], | |
30 | parser: '@typescript-eslint/parser', | |
31 | parserOptions: { | |
32 | project: './tsconfig.json' | |
33 | }, | |
34 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], | |
35 | extends: [ | |
5199f9fd | 36 | 'plugin:@typescript-eslint/strict-type-checked', |
66a7748d JB |
37 | 'plugin:@typescript-eslint/stylistic-type-checked', |
38 | 'plugin:import/typescript', | |
369e009a | 39 | 'love' |
66a7748d JB |
40 | ], |
41 | rules: { | |
42 | 'operator-linebreak': 'off', | |
43 | 'tsdoc/syntax': 'warn' | |
44 | } | |
45 | }, | |
46 | { | |
47 | files: ['**/*.js', '**/*.cjs', '**/*.mjs'], | |
48 | plugins: ['jsdoc'], | |
49 | extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'], | |
50 | rules: { | |
51 | 'n/shebang': 'off' | |
52 | } | |
53 | } | |
54 | ] | |
55 | }) |