-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
72 lines (70 loc) · 1.88 KB
/
eslint.config.js
File metadata and controls
72 lines (70 loc) · 1.88 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* ESLint flat config for metanorma-compile
* Migrated from .eslintrc.js to ESLint 9 flat config format
*/
import github from 'eslint-plugin-github';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettierPlugin from 'eslint-plugin-prettier';
import eslintComments from 'eslint-plugin-eslint-comments';
import importPlugin from 'eslint-plugin-import';
import i18nTextPlugin from 'eslint-plugin-i18n-text';
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests';
import { fixupPluginRules } from '@eslint/compat';
import globals from 'globals';
export default [
{
ignores: [
'node_modules/**',
'lib/**',
'dist/**',
'**/*.test.ts',
],
},
{
files: ['**/*.ts'],
languageOptions: {
ecmaVersion: 12,
sourceType: 'module',
parser: tsparser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
...globals.node,
},
},
plugins: {
'@typescript-eslint': tseslint,
github: fixupPluginRules(github),
prettier: prettierPlugin,
'eslint-comments': eslintComments,
import: importPlugin,
'i18n-text': fixupPluginRules(i18nTextPlugin),
'no-only-tests': noOnlyTestsPlugin,
},
rules: {
'i18n-text/no-en': 'off',
'eslint-comments/no-use': 'off',
'import/no-namespace': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'no-public',
},
],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-require-imports': 'error',
camelcase: 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
},
];