@oriflame/config-eslint 4.2.1 → 5.0.3
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/LICENSE +1 -1
- package/README.md +2 -81
- package/dts/index.d.ts +10 -0
- package/lib/index.js +45 -40
- package/lib/index.js.map +1 -0
- package/package.json +37 -30
- package/src/index.ts +21 -27
- package/CHANGELOG.md +0 -3589
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts +0 -4
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts.map +0 -1
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.js +0 -32
- package/lib/presets/base.d.ts +0 -4
- package/lib/presets/base.d.ts.map +0 -1
- package/lib/presets/base.js +0 -120
- package/lib/presets/future.d.ts +0 -4
- package/lib/presets/future.d.ts.map +0 -1
- package/lib/presets/future.js +0 -13
- package/lib/presets/nextjs.d.ts +0 -4
- package/lib/presets/nextjs.d.ts.map +0 -1
- package/lib/presets/nextjs.js +0 -13
- package/lib/presets/node.d.ts +0 -4
- package/lib/presets/node.d.ts.map +0 -1
- package/lib/presets/node.js +0 -26
- package/lib/presets/prettier.d.ts +0 -4
- package/lib/presets/prettier.d.ts.map +0 -1
- package/lib/presets/prettier.js +0 -13
- package/lib/presets/typescript.d.ts +0 -4
- package/lib/presets/typescript.d.ts.map +0 -1
- package/lib/presets/typescript.js +0 -40
- package/lib/resolvers/graphql.d.ts +0 -6
- package/lib/resolvers/graphql.d.ts.map +0 -1
- package/lib/resolvers/graphql.js +0 -12
- package/lib/rules/a11y.d.ts +0 -4
- package/lib/rules/a11y.d.ts.map +0 -1
- package/lib/rules/a11y.js +0 -45
- package/lib/rules/eslint-comments.d.ts +0 -4
- package/lib/rules/eslint-comments.d.ts.map +0 -1
- package/lib/rules/eslint-comments.js +0 -14
- package/lib/rules/eslint.d.ts +0 -4
- package/lib/rules/eslint.d.ts.map +0 -1
- package/lib/rules/eslint.js +0 -385
- package/lib/rules/import.d.ts +0 -4
- package/lib/rules/import.d.ts.map +0 -1
- package/lib/rules/import.js +0 -76
- package/lib/rules/jest.d.ts +0 -4
- package/lib/rules/jest.d.ts.map +0 -1
- package/lib/rules/jest.js +0 -59
- package/lib/rules/nextjs.d.ts +0 -4
- package/lib/rules/nextjs.d.ts.map +0 -1
- package/lib/rules/nextjs.js +0 -17
- package/lib/rules/node.d.ts +0 -4
- package/lib/rules/node.d.ts.map +0 -1
- package/lib/rules/node.js +0 -45
- package/lib/rules/prettier.d.ts +0 -4
- package/lib/rules/prettier.d.ts.map +0 -1
- package/lib/rules/prettier.js +0 -6
- package/lib/rules/promise.d.ts +0 -4
- package/lib/rules/promise.d.ts.map +0 -1
- package/lib/rules/promise.js +0 -24
- package/lib/rules/react-hooks.d.ts +0 -4
- package/lib/rules/react-hooks.d.ts.map +0 -1
- package/lib/rules/react-hooks.js +0 -7
- package/lib/rules/react.d.ts +0 -4
- package/lib/rules/react.d.ts.map +0 -1
- package/lib/rules/react.js +0 -143
- package/lib/rules/testing-library.d.ts +0 -4
- package/lib/rules/testing-library.d.ts.map +0 -1
- package/lib/rules/testing-library.js +0 -31
- package/lib/rules/typescript.d.ts +0 -4
- package/lib/rules/typescript.d.ts.map +0 -1
- package/lib/rules/typescript.js +0 -369
- package/lib/rules/unicorn.d.ts +0 -4
- package/lib/rules/unicorn.d.ts.map +0 -1
- package/lib/rules/unicorn.js +0 -105
- package/src/presets/SECRET_CONFIG_DO_NOT_USE_THIS.ts +0 -34
- package/src/presets/base.ts +0 -143
- package/src/presets/future.ts +0 -13
- package/src/presets/nextjs.ts +0 -13
- package/src/presets/node.ts +0 -27
- package/src/presets/prettier.ts +0 -13
- package/src/presets/typescript.ts +0 -45
- package/src/resolvers/graphql.ts +0 -11
- package/src/rules/a11y.ts +0 -47
- package/src/rules/eslint-comments.ts +0 -16
- package/src/rules/eslint.ts +0 -384
- package/src/rules/import.ts +0 -79
- package/src/rules/jest.ts +0 -64
- package/src/rules/nextjs.ts +0 -19
- package/src/rules/node.ts +0 -47
- package/src/rules/prettier.ts +0 -8
- package/src/rules/promise.ts +0 -26
- package/src/rules/react-hooks.ts +0 -9
- package/src/rules/react.ts +0 -145
- package/src/rules/testing-library.ts +0 -33
- package/src/rules/typescript.ts +0 -377
- package/src/rules/unicorn.ts +0 -108
- package/test/index.test.ts +0 -46
- package/test/lint-files/combo.ts +0 -10
- package/test/lint-files/errors/combo.ts +0 -3
- package/test/lint-files/errors/javascript.js +0 -2
- package/test/lint-files/errors/next.js +0 -11
- package/test/lint-files/errors/node.js +0 -3
- package/test/lint-files/errors/prettier.js +0 -5
- package/test/lint-files/errors/test.js +0 -3
- package/test/lint-files/errors/typescript.ts +0 -3
- package/test/lint-files/javascript.js +0 -1
- package/test/lint-files/next.ts +0 -5
- package/test/lint-files/node.js +0 -2
- package/test/lint-files/prettier.js +0 -1
- package/test/lint-files/test.js +0 -5
- package/test/lint-files/typescript.ts +0 -20
- package/test/tsconfig.json +0 -19
- package/test/utils/getErrors.ts +0 -16
- package/tools/check-rules/allRules.ts +0 -99
- package/tools/check-rules/index.ts +0 -90
- package/tools/check-rules/tsconfig.json +0 -17
- package/tsconfig.json +0 -22
- package/tsconfig.tsbuildinfo +0 -1
package/lib/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ESLintOptions {
|
|
2
|
-
future?: boolean;
|
|
3
|
-
node?: boolean;
|
|
4
|
-
typescript?: boolean;
|
|
5
|
-
nextjs?: boolean;
|
|
6
|
-
prettier?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function getExtendsList({ future, node, typescript, nextjs, prettier, }: ESLintOptions): string[];
|
|
9
|
-
export declare function getIgnoreList(): string[];
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAQD,wBAAgB,cAAc,CAAC,EAC7B,MAAc,EACd,IAAY,EACZ,UAAkB,EAClB,MAAc,EACd,QAAgB,GACjB,EAAE,aAAa,GAAG,MAAM,EAAE,CAwB1B;AAED,wBAAgB,aAAa,IAAI,MAAM,EAAE,CASxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SECRET_CONFIG_DO_NOT_USE_THIS.d.ts","sourceRoot":"","sources":["../../src/presets/SECRET_CONFIG_DO_NOT_USE_THIS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,QAAA,MAAM,MAAM,EAAE,YA4Bb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
3
|
-
const config = {
|
|
4
|
-
rules: {
|
|
5
|
-
'node/no-sync': 'off',
|
|
6
|
-
'node/global-require': 'off',
|
|
7
|
-
'import/no-dynamic-require': 'off',
|
|
8
|
-
'no-underscore-dangle': 'off',
|
|
9
|
-
'eslint-comments/disable-enable-pair': 'off',
|
|
10
|
-
'eslint-comments/no-aggregating-enable': 'off',
|
|
11
|
-
'eslint-comments/no-duplicate-disable': 'off',
|
|
12
|
-
'eslint-comments/no-restricted-disable': 'off',
|
|
13
|
-
'eslint-comments/no-unlimited-disable': 'off',
|
|
14
|
-
'eslint-comments/no-unused-disable': 'off',
|
|
15
|
-
'eslint-comments/no-unused-enable': 'off',
|
|
16
|
-
'eslint-comments/no-use': 'off',
|
|
17
|
-
'eslint-comments/require-description': 'off',
|
|
18
|
-
},
|
|
19
|
-
overrides: [
|
|
20
|
-
{
|
|
21
|
-
files: [`*.${lumos_common_1.TSX_EXTS_GROUP}`],
|
|
22
|
-
rules: {
|
|
23
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
24
|
-
'@typescript-eslint/naming-convention': 'off',
|
|
25
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
26
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
27
|
-
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
};
|
|
32
|
-
module.exports = config;
|
package/lib/presets/base.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/presets/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAmBpD,QAAA,MAAM,MAAM,EAAE,YAwHb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/presets/base.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const core_1 = require("@beemo/core");
|
|
6
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
7
|
-
const a11y_1 = __importDefault(require("../rules/a11y"));
|
|
8
|
-
const eslint_1 = __importDefault(require("../rules/eslint"));
|
|
9
|
-
const eslint_comments_1 = __importDefault(require("../rules/eslint-comments"));
|
|
10
|
-
const import_1 = __importDefault(require("../rules/import"));
|
|
11
|
-
const jest_1 = __importDefault(require("../rules/jest"));
|
|
12
|
-
const promise_1 = __importDefault(require("../rules/promise"));
|
|
13
|
-
const react_1 = __importDefault(require("../rules/react"));
|
|
14
|
-
const react_hooks_1 = __importDefault(require("../rules/react-hooks"));
|
|
15
|
-
const testing_library_1 = __importDefault(require("../rules/testing-library"));
|
|
16
|
-
const config = {
|
|
17
|
-
root: true,
|
|
18
|
-
parser: '@babel/eslint-parser',
|
|
19
|
-
parserOptions: {
|
|
20
|
-
requireConfigFile: false,
|
|
21
|
-
ecmaVersion: 2020,
|
|
22
|
-
sourceType: 'module',
|
|
23
|
-
ecmaFeatures: {
|
|
24
|
-
jsx: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
// Extends list for base plugins
|
|
28
|
-
extends: [
|
|
29
|
-
'eslint:recommended',
|
|
30
|
-
'plugin:react/recommended',
|
|
31
|
-
'plugin:react-hooks/recommended',
|
|
32
|
-
'plugin:jsx-a11y/recommended',
|
|
33
|
-
'plugin:eslint-plugin-promise/recommended',
|
|
34
|
-
],
|
|
35
|
-
// Required plugins; doesn't matter if they are used or not.
|
|
36
|
-
plugins: ['import', 'react', 'react-hooks', 'jsx-a11y', 'node', 'eslint-comments', 'promise'],
|
|
37
|
-
env: {
|
|
38
|
-
browser: true,
|
|
39
|
-
es2020: true,
|
|
40
|
-
worker: true,
|
|
41
|
-
serviceworker: true,
|
|
42
|
-
},
|
|
43
|
-
globals: {
|
|
44
|
-
__DEV__: 'readonly',
|
|
45
|
-
// metrics and analytics providers
|
|
46
|
-
ga: 'readonly',
|
|
47
|
-
newrelic: 'readonly',
|
|
48
|
-
// mostly for easier compatibility between browsers, workers, etc
|
|
49
|
-
global: 'readonly',
|
|
50
|
-
// mostly references to `process.env.NODE_ENV`
|
|
51
|
-
process: 'readonly',
|
|
52
|
-
// references for globalThis
|
|
53
|
-
globalThis: 'readonly',
|
|
54
|
-
// Webpack variables
|
|
55
|
-
__webpack_public_path__: 'writeable',
|
|
56
|
-
__webpack_require__: 'readonly',
|
|
57
|
-
__webpack_chunk_load__: 'readonly',
|
|
58
|
-
__webpack_modules__: 'readonly',
|
|
59
|
-
__webpack_hash__: 'readonly',
|
|
60
|
-
__non_webpack_require__: 'readonly',
|
|
61
|
-
__webpack_exports_info__: 'readonly',
|
|
62
|
-
DEBUG: 'readonly',
|
|
63
|
-
},
|
|
64
|
-
reportUnusedDisableDirectives: true,
|
|
65
|
-
settings: {
|
|
66
|
-
'import/ignore': [
|
|
67
|
-
'node_modules',
|
|
68
|
-
'\\.json$',
|
|
69
|
-
lumos_common_1.ASSET_EXT_PATTERN.source,
|
|
70
|
-
lumos_common_1.CSS_EXT_PATTERN.source,
|
|
71
|
-
lumos_common_1.GQL_EXT_PATTERN.source,
|
|
72
|
-
],
|
|
73
|
-
'import/extensions': lumos_common_1.EXTS,
|
|
74
|
-
'import/resolver': {
|
|
75
|
-
node: {
|
|
76
|
-
extensions: lumos_common_1.EXTS,
|
|
77
|
-
},
|
|
78
|
-
[core_1.Path.resolve('../resolvers/graphql.js', __dirname).path()]: {
|
|
79
|
-
extensions: ['.gql', '.graphql'],
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
react: {
|
|
83
|
-
version: 'detect',
|
|
84
|
-
},
|
|
85
|
-
propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'],
|
|
86
|
-
},
|
|
87
|
-
rules: {
|
|
88
|
-
...eslint_1.default,
|
|
89
|
-
...eslint_comments_1.default,
|
|
90
|
-
...promise_1.default,
|
|
91
|
-
...import_1.default,
|
|
92
|
-
...react_1.default,
|
|
93
|
-
...react_hooks_1.default,
|
|
94
|
-
...a11y_1.default,
|
|
95
|
-
},
|
|
96
|
-
overrides: [
|
|
97
|
-
{
|
|
98
|
-
files: [`*.test.${lumos_common_1.TJSX_EXTS_GROUP}`],
|
|
99
|
-
plugins: ['jest', 'testing-library'],
|
|
100
|
-
extends: ['plugin:jest/recommended', 'plugin:testing-library/react'],
|
|
101
|
-
settings: {
|
|
102
|
-
'testing-library/custom-queries': 'off',
|
|
103
|
-
'testing-library/custom-renders': 'off',
|
|
104
|
-
'testing-library/utils-module': 'off',
|
|
105
|
-
},
|
|
106
|
-
globals: {
|
|
107
|
-
jsdom: 'readonly',
|
|
108
|
-
},
|
|
109
|
-
env: {
|
|
110
|
-
jest: true,
|
|
111
|
-
node: true,
|
|
112
|
-
},
|
|
113
|
-
rules: {
|
|
114
|
-
...jest_1.default,
|
|
115
|
-
...testing_library_1.default,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
module.exports = config;
|
package/lib/presets/future.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"future.d.ts","sourceRoot":"","sources":["../../src/presets/future.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,QAAA,MAAM,MAAM,EAAE,YAMb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/presets/future.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const unicorn_1 = __importDefault(require("../rules/unicorn"));
|
|
6
|
-
const config = {
|
|
7
|
-
extends: ['plugin:unicorn/recommended'],
|
|
8
|
-
plugins: ['unicorn'],
|
|
9
|
-
rules: {
|
|
10
|
-
...unicorn_1.default,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
module.exports = config;
|
package/lib/presets/nextjs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/presets/nextjs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,QAAA,MAAM,MAAM,EAAE,YAMb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/presets/nextjs.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const nextjs_1 = __importDefault(require("../rules/nextjs"));
|
|
6
|
-
const config = {
|
|
7
|
-
extends: ['plugin:@next/next/recommended'],
|
|
8
|
-
plugins: ['@next/next'],
|
|
9
|
-
rules: {
|
|
10
|
-
...nextjs_1.default,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
module.exports = config;
|
package/lib/presets/node.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/presets/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,QAAA,MAAM,MAAM,EAAE,YAoBb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/presets/node.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const node_1 = __importDefault(require("../rules/node"));
|
|
6
|
-
const config = {
|
|
7
|
-
// TODO: this also sets up globals and `parserOptions.sourceType`, so we should decide in later versions of this config if we want to use this `extends`
|
|
8
|
-
// extends: ['plugin:node/recommended'],
|
|
9
|
-
env: {
|
|
10
|
-
browser: false,
|
|
11
|
-
node: true,
|
|
12
|
-
},
|
|
13
|
-
settings: {
|
|
14
|
-
node: {
|
|
15
|
-
tryExtensions: ['.js', '.jsx', '.json'],
|
|
16
|
-
},
|
|
17
|
-
convertPath: {
|
|
18
|
-
'src/**/*.ts': ['^src/(.+?)\\.ts$', 'lib/$1.js'],
|
|
19
|
-
'src/**/*.tsx': ['^src/(.+?)\\.tsx$', 'lib/$1.js'],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
rules: {
|
|
23
|
-
...node_1.default,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
module.exports = config;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/presets/prettier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,QAAA,MAAM,MAAM,EAAE,YAMb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/presets/prettier.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const prettier_1 = __importDefault(require("../rules/prettier"));
|
|
6
|
-
const config = {
|
|
7
|
-
extends: ['eslint-config-prettier'],
|
|
8
|
-
plugins: ['eslint-plugin-prettier'],
|
|
9
|
-
rules: {
|
|
10
|
-
...prettier_1.default,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
module.exports = config;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/presets/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAOpD,QAAA,MAAM,MAAM,EAAE,YAmCb,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
6
|
-
const typescript_1 = __importDefault(require("../rules/typescript"));
|
|
7
|
-
const project = (0, lumos_common_1.fromRoot)('tsconfig.eslint.json', true) || (0, lumos_common_1.fromRoot)('tsconfig.json');
|
|
8
|
-
const config = {
|
|
9
|
-
overrides: [
|
|
10
|
-
{
|
|
11
|
-
files: [`*.${lumos_common_1.TSX_EXTS_GROUP}`],
|
|
12
|
-
plugins: ['@typescript-eslint'],
|
|
13
|
-
parser: '@typescript-eslint/parser',
|
|
14
|
-
parserOptions: {
|
|
15
|
-
project,
|
|
16
|
-
},
|
|
17
|
-
settings: {
|
|
18
|
-
node: {
|
|
19
|
-
tryExtensions: lumos_common_1.EXTS,
|
|
20
|
-
},
|
|
21
|
-
'import/resolver': {
|
|
22
|
-
typescript: {},
|
|
23
|
-
},
|
|
24
|
-
'import/parsers': {
|
|
25
|
-
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
rules: {
|
|
29
|
-
...typescript_1.default,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
files: [`*.test.${lumos_common_1.TSX_EXTS_GROUP}`],
|
|
34
|
-
rules: {
|
|
35
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
};
|
|
40
|
-
module.exports = config;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/resolvers/graphql.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAM1E"}
|
package/lib/resolvers/graphql.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolve = exports.interfaceVersion = void 0;
|
|
4
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
5
|
-
exports.interfaceVersion = 2;
|
|
6
|
-
function resolve(source) {
|
|
7
|
-
if (lumos_common_1.GQL_EXT_PATTERN.test(source)) {
|
|
8
|
-
return { found: true, path: null };
|
|
9
|
-
}
|
|
10
|
-
return { found: false };
|
|
11
|
-
}
|
|
12
|
-
exports.resolve = resolve;
|
package/lib/rules/a11y.d.ts
DELETED
package/lib/rules/a11y.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/rules/a11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CA0CjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/a11y.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const config = {
|
|
3
|
-
// eslint-plugin-jsx-a11y rules
|
|
4
|
-
'jsx-a11y/alt-text': 'warn',
|
|
5
|
-
'jsx-a11y/anchor-has-content': ['warn', { components: ['Link'] }],
|
|
6
|
-
'jsx-a11y/anchor-is-valid': [
|
|
7
|
-
'error',
|
|
8
|
-
{
|
|
9
|
-
components: ['Link'],
|
|
10
|
-
specialLink: ['hrefLeft', 'hrefRight', 'to'],
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
|
|
14
|
-
'jsx-a11y/aria-props': 'error',
|
|
15
|
-
'jsx-a11y/aria-proptypes': 'error',
|
|
16
|
-
'jsx-a11y/aria-role': ['error', { ignoreNonDOM: false }],
|
|
17
|
-
'jsx-a11y/aria-unsupported-elements': 'error',
|
|
18
|
-
'jsx-a11y/autocomplete-valid': 'warn',
|
|
19
|
-
'jsx-a11y/click-events-have-key-events': 'warn',
|
|
20
|
-
'jsx-a11y/control-has-associated-label': 'warn',
|
|
21
|
-
'jsx-a11y/heading-has-content': ['warn', { components: ['Typography'] }],
|
|
22
|
-
'jsx-a11y/html-has-lang': 'warn',
|
|
23
|
-
'jsx-a11y/iframe-has-title': 'warn',
|
|
24
|
-
'jsx-a11y/img-redundant-alt': 'warn',
|
|
25
|
-
'jsx-a11y/interactive-supports-focus': 'warn',
|
|
26
|
-
'jsx-a11y/label-has-associated-control': 'warn',
|
|
27
|
-
'jsx-a11y/lang': 'error',
|
|
28
|
-
'jsx-a11y/media-has-caption': 'warn',
|
|
29
|
-
'jsx-a11y/mouse-events-have-key-events': 'warn',
|
|
30
|
-
'jsx-a11y/no-access-key': 'warn',
|
|
31
|
-
'jsx-a11y/no-autofocus': 'off',
|
|
32
|
-
'jsx-a11y/no-distracting-elements': 'error',
|
|
33
|
-
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn',
|
|
34
|
-
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
|
|
35
|
-
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn',
|
|
36
|
-
'jsx-a11y/no-noninteractive-tabindex': 'error',
|
|
37
|
-
'jsx-a11y/no-onchange': 'warn',
|
|
38
|
-
'jsx-a11y/no-redundant-roles': 'error',
|
|
39
|
-
'jsx-a11y/no-static-element-interactions': 'warn',
|
|
40
|
-
'jsx-a11y/role-has-required-aria-props': 'error',
|
|
41
|
-
'jsx-a11y/role-supports-aria-props': 'error',
|
|
42
|
-
'jsx-a11y/scope': 'error',
|
|
43
|
-
'jsx-a11y/tabindex-no-positive': 'error', // enforce tabIndex value is not greater than zero
|
|
44
|
-
};
|
|
45
|
-
module.exports = config;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-comments.d.ts","sourceRoot":"","sources":["../../src/rules/eslint-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CAWjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const config = {
|
|
3
|
-
// eslint-plugin-eslint-comments rules
|
|
4
|
-
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
|
|
5
|
-
'eslint-comments/no-aggregating-enable': 'error',
|
|
6
|
-
'eslint-comments/no-duplicate-disable': 'error',
|
|
7
|
-
'eslint-comments/no-restricted-disable': 'off',
|
|
8
|
-
'eslint-comments/no-unlimited-disable': 'error',
|
|
9
|
-
'eslint-comments/no-unused-disable': 'off',
|
|
10
|
-
'eslint-comments/no-unused-enable': 'error',
|
|
11
|
-
'eslint-comments/no-use': 'off',
|
|
12
|
-
'eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }], // require include descriptions in ESLint directive-comments
|
|
13
|
-
};
|
|
14
|
-
module.exports = config;
|
package/lib/rules/eslint.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/rules/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CA0XjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|