forked from comunica/comunica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
86 lines (83 loc) · 2.24 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname, // this is the reason this is a .js file
project: ['./tsconfig.eslint.json'],
},
extends: [
'@rubensworks',
],
// TODO: Remove this once solid-client-authn supports node 18.
ignorePatterns: ['*QuerySparql-solid-test.ts'],
rules: {
// Default
'unicorn/consistent-destructuring': 'off',
'unicorn/no-array-callback-reference': 'off',
// TODO: Try to re-enable the following rules in the future
'unicorn/prefer-at': 'off',
'unicorn/prefer-string-replace-all': 'off',
'import/no-commonjs': 'off',
'import/group-exports': 'off',
'import/exports-last': 'off',
'import/extensions': 'off',
},
overrides: [
{
// Specific rules for NodeJS-specific files
files: [
'**/test/**/*.ts',
'packages/actor-dereference-file/**/*.ts',
'packages/actor-http-native/**/*.ts',
'packages/logger-bunyan/**/*.ts',
'packages/packager/**/*.ts',
],
rules: {
'import/no-nodejs-modules': 'off',
},
},
{
// Only the packager makes use of dynamic require
files: [
'packages/packager/bin/package.ts',
],
rules: {
'import/no-dynamic-require': 'off',
},
},
{
// The config packages use an empty index.ts
files: [
'engines/config-*/lib/index.ts',
],
rules: {
'import/unambiguous': 'off',
},
},
{
// Some packages make use of 'export default'
files: [
'packages/actor-http-*/lib/*.ts',
'packages/jest/**/*.ts',
],
rules: {
'import/no-anonymous-default-export': 'off',
'import/no-default-export': 'off',
},
},
{
// Some test files import 'jest-rdf' which triggers this
// The http actors import 'cross-fetch/polyfill' which also triggers this
// Some jest tests import '../../lib' which triggers this
files: [
'**/test/*-test.ts',
'**/test/*-util.ts',
'packages/jest/test/matchers/*-test.ts',
'packages/actor-http-*/lib/*.ts',
],
rules: {
'import/no-unassigned-import': 'off',
},
},
],
};