-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
43 lines (43 loc) · 1.25 KB
/
.eslintrc.js
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
/** @type {import('@types/eslint').Linter.BaseConfig} */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'@remix-run/eslint-config',
'@remix-run/eslint-config/node',
'@remix-run/eslint-config/jest-testing-library',
'prettier',
'plugin:prettier/recommended',
],
env: {
'cypress/globals': true,
},
plugins: ['cypress', 'remix', 'prettier', '@typescript-eslint'],
// We're using vitest which has a very similar API to jest
// (so the linting plugins work nicely), but we have to
// set the jest version explicitly.
settings: {
jest: {
version: 28,
},
},
rules: {
'remix/node-server-imports': 'error',
'remix/use-loader-data-types': 'error',
'prettier/prettier': 'error',
'no-return-await': 'error',
'no-duplicate-imports': 'error',
'no-unreachable-loop': 'error',
'no-use-before-define': 'error',
'arrow-body-style': 'warn',
camelcase: 'warn',
'consistent-return': 'warn',
'dot-notation': 'warn',
eqeqeq: 'warn',
'prefer-arrow-callback': 'warn',
},
reportUnusedDisableDirectives: true,
ignorePatterns: ['!.*.js', 'app/plugins/', 'mocks/', 'cypress/'],
};