-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
65 lines (63 loc) · 2.02 KB
/
.eslintrc.cjs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(() => {
const { readFileSync } = require('fs');
const dictionarySkipWords = readFileSync(__dirname + '/dictionary.dic').toString().split('\n');
module.exports = {
env: {
jest: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:boundaries/recommended',
'plugin:jsonc/recommended-with-jsonc',
'plugin:prettier/recommended',
],
ignorePatterns: ['package-lock.json'],
overrides: [
{
files: ['*.ts'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: '2022',
extraFileExtensions: ['.json'],
project: 'tsconfig.json',
sourceType: 'module',
tsconfigRootDir: __dirname,
},
plugins: ['@nx', '@typescript-eslint/eslint-plugin', 'boundaries', 'import', 'spellcheck'],
root: true,
rules: {
'@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports'}],
'@typescript-eslint/explicit-function-return-type': 2,
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'jsonc/sort-keys': ['error', 'asc', { caseSensitive: false, minKeys: 2, natural: false }],
'max-len': ['error', { code: 120, ignoreStrings: true }],
'no-duplicate-imports': ['error', { 'includeExports': true }],
'sort-imports': [
'error',
{
allowSeparatedGroups: true,
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'sort-keys': ['error', 'asc', { caseSensitive: false, minKeys: 2, natural: false }],
'spellcheck/spell-checker': [
1,
{
minLength: 3,
skipWords: dictionarySkipWords,
},
],
},
};
})();