forked from bcgov/BC-Wallet-Demo
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
106 lines (106 loc) · 3.02 KB
/
Copy patheslint.config.js
File metadata and controls
106 lines (106 loc) · 3.02 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
module.exports = [
{
ignores: [
'**/dist/**',
'**/build/**',
'apps/*/src/showcase-api/**',
'apps/bc-wallet-showcase-creator/**',
'**/*.spec.ts',
'**/node_modules/**',
'**/.next/**',
'**/charts/**',
'**/.turbo/**',
'**/.vscode/**',
'**/.idea/**',
'**/coverage/**',
'**/.cache/**',
'**/logs/**',
'**/*.log',
],
},
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: require('@typescript-eslint/parser'),
},
plugins: {
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
import: require('eslint-plugin-import'),
prettier: require('eslint-plugin-prettier'),
cypress: require('eslint-plugin-cypress'),
'import-helpers': require('eslint-plugin-import-helpers'),
},
settings: {
'import/extensions': ['.js', '.ts'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: 'packages/*/tsconfig.json',
alwaysTryTypes: true,
},
},
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
'@typescript-eslint/explicit-member-accessibility': 'error',
'no-console': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'import/no-cycle': 'error',
'import/order': 'off',
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always',
groups: ['/^react/', 'module', ['parent', 'sibling', 'index'], ['absolute']],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
},
],
'prettier/prettier': ['warn', { endOfLine: 'auto' }],
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
'cypress/no-pause': 'error',
},
},
{
files: ['jest.config.ts', '.eslintrc.js', 'eslint.config.js'],
languageOptions: {
globals: {
process: 'readonly',
require: 'readonly',
module: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
},
},
},
{
files: ['*.test.ts', '**/__tests__/**', '**/tests/**', 'jest.*.ts', 'samples/**'],
languageOptions: {
globals: {
jest: 'readonly',
expect: 'readonly',
describe: 'readonly',
it: 'readonly',
test: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
},
},
},
]