generated from PAST3LLE/TRY-N-PT
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
66 lines (65 loc) · 1.79 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const path = require('path')
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
// Allows for the parsing of JSX
jsx: true
},
project: [
// "./tsconfig.eslint.json",
'./apps/*/tsconfig.json',
'./packages/*/tsconfig.json',
'./examples/*/tsconfig.json'
]
},
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
ignorePatterns: ['node_modules/**/*', '.github/*', 'build', 'dist', '.eslintrc.js', '.eslintrc.mjs', '*.config.js'],
settings: {
react: {
version: 'detect'
}
},
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'object-shorthand': ['error', 'always'],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'lodash',
message: "Please import from 'lodash/module' directly to support tree-shaking."
},
{
name: '@lingui/macro',
importNames: ['t'],
message: 'Please use <Trans> instead of t.'
}
],
patterns: [
{
group: ['**/dist'],
message: 'Do not import from dist/ - this is an implementation detail, and breaks tree-shaking.'
}
]
}
]
}
}