forked from lecca-digital/lecca-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
50 lines (49 loc) · 1.35 KB
/
eslint.config.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
const eslintPluginReactHooks = require('eslint-plugin-react-hooks');
const nx = require('@nx/eslint-plugin');
module.exports = [
...nx.configs['flat/base'],
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
{
ignores: ['**/dist'],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
plugins: {
'react-hooks': eslintPluginReactHooks,
},
rules: {
...eslintPluginReactHooks.configs.recommended.rules,
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-restricted-syntax': [
'error',
{
selector:
'CallExpression[callee.object.name="console"][callee.property.name="log"]',
message:
'console.log is not allowed. Use console.error or console.info instead if you intend to commit the log.',
},
],
},
},
];