@cubejs-backend/linter 1.7.36 → 1.7.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oxlintrc.json +68 -0
- package/airbnb-base.json +703 -0
- package/airbnb-react.json +917 -0
- package/package.json +9 -16
- package/index.js +0 -114
package/package.json
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-backend/linter",
|
|
3
|
-
"description": "Cube.js
|
|
3
|
+
"description": "Cube.js shared oxlint configuration (virtual package) for linting code",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "1.7.
|
|
5
|
+
"version": "1.7.37",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
9
|
-
"directory": "packages/cubejs-
|
|
9
|
+
"directory": "packages/cubejs-linter"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=20.0.0"
|
|
13
13
|
},
|
|
14
|
-
"main": "index.js",
|
|
15
|
-
"peerDependencies": {
|
|
16
|
-
"eslint": ">=8.57"
|
|
17
|
-
},
|
|
18
14
|
"dependencies": {
|
|
19
|
-
"@stylistic/eslint-plugin
|
|
20
|
-
"
|
|
21
|
-
"@typescript-eslint/parser": "^8.46.0",
|
|
22
|
-
"eslint": "^8.57.1",
|
|
23
|
-
"eslint-config-airbnb-base": "^14.2.1",
|
|
24
|
-
"eslint-plugin-import": "^2.22.1",
|
|
25
|
-
"eslint-plugin-node": "^10.0.0"
|
|
15
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
16
|
+
"oxlint": "^1.82.0"
|
|
26
17
|
},
|
|
27
18
|
"files": [
|
|
28
|
-
"
|
|
19
|
+
".oxlintrc.json",
|
|
20
|
+
"airbnb-base.json",
|
|
21
|
+
"airbnb-react.json"
|
|
29
22
|
],
|
|
30
23
|
"license": "Apache-2.0",
|
|
31
24
|
"publishConfig": {
|
|
32
25
|
"access": "public"
|
|
33
26
|
},
|
|
34
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "28c8efd405d900a1b9cb6cb5ebc2ec951aa375be"
|
|
35
28
|
}
|
package/index.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
extends: 'airbnb-base',
|
|
4
|
-
env: {
|
|
5
|
-
node: true,
|
|
6
|
-
},
|
|
7
|
-
plugins: ['import', '@typescript-eslint/eslint-plugin', '@stylistic/ts'],
|
|
8
|
-
parser: '@typescript-eslint/parser',
|
|
9
|
-
parserOptions: {
|
|
10
|
-
sourceType: 'module',
|
|
11
|
-
ecmaVersion: 2020,
|
|
12
|
-
ecmaFeatures: {
|
|
13
|
-
legacyDecorators: true,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
rules: {
|
|
17
|
-
'no-useless-constructor': 0,
|
|
18
|
-
'max-classes-per-file': 0,
|
|
19
|
-
'prefer-object-spread': 0,
|
|
20
|
-
'import/no-unresolved': 0,
|
|
21
|
-
'comma-dangle': 0,
|
|
22
|
-
'no-console': 0,
|
|
23
|
-
'arrow-parens': 0,
|
|
24
|
-
'import/prefer-default-export': 0,
|
|
25
|
-
'import/extensions': 0,
|
|
26
|
-
quotes: ['warn', 'single'],
|
|
27
|
-
'no-prototype-builtins': 0,
|
|
28
|
-
'class-methods-use-this': 0,
|
|
29
|
-
'no-param-reassign': 0,
|
|
30
|
-
'no-mixed-operators': 0,
|
|
31
|
-
'no-else-return': 0,
|
|
32
|
-
'prefer-promise-reject-errors': 0,
|
|
33
|
-
'no-plusplus': 0,
|
|
34
|
-
'no-await-in-loop': 0,
|
|
35
|
-
'operator-linebreak': 0,
|
|
36
|
-
// linter can't fix this itself and, in some cases, conflicts with `arrow-body-style`
|
|
37
|
-
'max-len': 0,
|
|
38
|
-
'no-trailing-spaces': ['warn', { skipBlankLines: true }],
|
|
39
|
-
'object-curly-newline': 0,
|
|
40
|
-
// TypeScript Recommended
|
|
41
|
-
'no-array-constructor': 'off',
|
|
42
|
-
'@typescript-eslint/no-array-constructor': 'error',
|
|
43
|
-
'no-empty-function': 'off',
|
|
44
|
-
'@typescript-eslint/no-empty-function': 'error',
|
|
45
|
-
'no-extra-semi': 'off',
|
|
46
|
-
'@stylistic/ts/no-extra-semi': 'error',
|
|
47
|
-
'no-underscore-dangle': 'off',
|
|
48
|
-
'no-unused-vars': 'off',
|
|
49
|
-
'@typescript-eslint/no-unused-vars': [
|
|
50
|
-
'warn',
|
|
51
|
-
{
|
|
52
|
-
argsIgnorePattern: '^_.*',
|
|
53
|
-
varsIgnorePattern: '^_.*',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
// '@typescript-eslint/no-var-requires': 'error',
|
|
57
|
-
'@typescript-eslint/prefer-as-const': 'error',
|
|
58
|
-
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
59
|
-
'@typescript-eslint/triple-slash-reference': 'error',
|
|
60
|
-
'@stylistic/ts/type-annotation-spacing': 'error',
|
|
61
|
-
'@stylistic/ts/space-infix-ops': 'error',
|
|
62
|
-
'no-restricted-syntax': [
|
|
63
|
-
'error',
|
|
64
|
-
{
|
|
65
|
-
selector: 'ForInStatement',
|
|
66
|
-
message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
selector: 'LabeledStatement',
|
|
70
|
-
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
selector: 'WithStatement',
|
|
74
|
-
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
overrides: [
|
|
79
|
-
{
|
|
80
|
-
files: ['*.ts', '*.tsx'],
|
|
81
|
-
rules: {
|
|
82
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/eslint-recommended.ts
|
|
83
|
-
'constructor-super': 'off', // ts(2335) & ts(2377)
|
|
84
|
-
'getter-return': 'off', // ts(2378)
|
|
85
|
-
'no-const-assign': 'off', // ts(2588)
|
|
86
|
-
'no-dupe-args': 'off', // ts(2300)
|
|
87
|
-
'no-dupe-class-members': 'off', // ts(2393) & ts(2300)
|
|
88
|
-
'no-dupe-keys': 'off', // ts(1117)
|
|
89
|
-
'no-func-assign': 'off', // ts(2539)
|
|
90
|
-
'no-import-assign': 'off', // ts(2539) & ts(2540)
|
|
91
|
-
'no-new-symbol': 'off', // ts(2588)
|
|
92
|
-
'no-obj-calls': 'off', // ts(2349)
|
|
93
|
-
'no-redeclare': 'off', // ts(2451)
|
|
94
|
-
'no-setter-return': 'off', // ts(2408)
|
|
95
|
-
'no-this-before-super': 'off', // ts(2376)
|
|
96
|
-
'no-undef': 'off', // ts(2304)
|
|
97
|
-
'no-unreachable': 'off', // ts(7027)
|
|
98
|
-
'no-unsafe-negation': 'off', // ts(2365) & ts(2360) & ts(2358)
|
|
99
|
-
'no-var': 'error', // ts transpiles let/const to var, so no need for vars any more
|
|
100
|
-
'prefer-const': 'error', // ts provides better types with const
|
|
101
|
-
'prefer-rest-params': 'error', // ts provides better types with rest args over arguments
|
|
102
|
-
'prefer-spread': 'error', // ts transpiles spread to apply, so no need for manual apply
|
|
103
|
-
'valid-typeof': 'off', // ts(2367)
|
|
104
|
-
// TypeScript Additional
|
|
105
|
-
'@typescript-eslint/explicit-member-accessibility': 'error',
|
|
106
|
-
'no-shadow': 'off',
|
|
107
|
-
'@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }],
|
|
108
|
-
'no-duplicate-imports': 'off',
|
|
109
|
-
semi: 'off',
|
|
110
|
-
'@stylistic/ts/semi': 'error',
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
};
|