@oriflame/config-eslint 4.1.12 → 4.1.16-alpha.38
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/CHANGELOG.md +84 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +41 -41
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts +3 -3
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.js +32 -32
- package/lib/presets/base.d.ts +3 -3
- package/lib/presets/base.js +120 -120
- package/lib/presets/future.d.ts +3 -3
- package/lib/presets/future.js +13 -13
- package/lib/presets/nextjs.d.ts +3 -3
- package/lib/presets/nextjs.js +13 -13
- package/lib/presets/node.d.ts +3 -3
- package/lib/presets/node.js +26 -26
- package/lib/presets/prettier.d.ts +3 -3
- package/lib/presets/prettier.js +13 -13
- package/lib/presets/typescript.d.ts +3 -3
- package/lib/presets/typescript.js +40 -40
- package/lib/resolvers/graphql.d.ts +5 -5
- package/lib/resolvers/graphql.js +12 -12
- package/lib/rules/a11y.d.ts +3 -3
- package/lib/rules/a11y.d.ts.map +1 -1
- package/lib/rules/a11y.js +46 -45
- package/lib/rules/eslint-comments.d.ts +3 -3
- package/lib/rules/eslint-comments.d.ts.map +1 -1
- package/lib/rules/eslint-comments.js +15 -14
- package/lib/rules/eslint.d.ts +3 -3
- package/lib/rules/eslint.d.ts.map +1 -1
- package/lib/rules/eslint.js +386 -385
- package/lib/rules/import.d.ts +3 -3
- package/lib/rules/import.d.ts.map +1 -1
- package/lib/rules/import.js +77 -76
- package/lib/rules/jest.d.ts +3 -3
- package/lib/rules/jest.d.ts.map +1 -1
- package/lib/rules/jest.js +60 -59
- package/lib/rules/nextjs.d.ts +3 -3
- package/lib/rules/nextjs.d.ts.map +1 -1
- package/lib/rules/nextjs.js +18 -17
- package/lib/rules/node.d.ts +3 -3
- package/lib/rules/node.d.ts.map +1 -1
- package/lib/rules/node.js +46 -45
- package/lib/rules/prettier.d.ts +3 -3
- package/lib/rules/prettier.d.ts.map +1 -1
- package/lib/rules/prettier.js +7 -6
- package/lib/rules/promise.d.ts +3 -3
- package/lib/rules/promise.d.ts.map +1 -1
- package/lib/rules/promise.js +25 -24
- package/lib/rules/react-hooks.d.ts +3 -3
- package/lib/rules/react-hooks.d.ts.map +1 -1
- package/lib/rules/react-hooks.js +8 -7
- package/lib/rules/react.d.ts +3 -3
- package/lib/rules/react.d.ts.map +1 -1
- package/lib/rules/react.js +144 -143
- package/lib/rules/testing-library.d.ts +3 -3
- package/lib/rules/testing-library.d.ts.map +1 -1
- package/lib/rules/testing-library.js +32 -31
- package/lib/rules/typescript.d.ts +3 -3
- package/lib/rules/typescript.d.ts.map +1 -1
- package/lib/rules/typescript.js +370 -369
- package/lib/rules/unicorn.d.ts +3 -3
- package/lib/rules/unicorn.d.ts.map +1 -1
- package/lib/rules/unicorn.js +106 -105
- package/package.json +20 -18
- package/src/index.ts +3 -0
- package/src/presets/base.ts +1 -1
- package/src/rules/a11y.ts +1 -1
- package/src/rules/eslint-comments.ts +1 -1
- package/src/rules/eslint.ts +1 -1
- package/src/rules/import.ts +1 -1
- package/src/rules/jest.ts +2 -2
- package/src/rules/nextjs.ts +2 -2
- package/src/rules/node.ts +1 -1
- package/src/rules/prettier.ts +1 -1
- package/src/rules/promise.ts +1 -1
- package/src/rules/react-hooks.ts +1 -1
- package/src/rules/react.ts +1 -1
- package/src/rules/testing-library.ts +1 -1
- package/src/rules/typescript.ts +1 -1
- package/src/rules/unicorn.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,90 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.3.0 - 2021-11-30
|
|
7
|
+
|
|
8
|
+
#### 🚀 Updates
|
|
9
|
+
|
|
10
|
+
- Update ESLint rules. (#892) ([5436a7f](https://github.com/Oriflame/lumos/commit/5436a7f741c50e4d852cb9598ef6bf574e1bbbfc)), work items [#892](https://github.com/Oriflame/lumos/issues/892)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 4.2.3 - 2021-11-16
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### 4.2.2 - 2021-11-09
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### 4.2.1 - 2021-11-08
|
|
35
|
+
|
|
36
|
+
#### 🐞 Fixes
|
|
37
|
+
|
|
38
|
+
- Revert react/jsx-handler-names rule change. (#889) ([36f44c1](https://github.com/Oriflame/lumos/commit/36f44c1db0d4e74408334f3dfe5f259e8fc6f05f)), work items [#889](https://github.com/Oriflame/lumos/issues/889)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 4.2.0 - 2021-11-08
|
|
47
|
+
|
|
48
|
+
#### 🚀 Updates
|
|
49
|
+
|
|
50
|
+
- Update ESLint rules. (#885) ([e70c4fd](https://github.com/Oriflame/lumos/commit/e70c4fdac6bf7d7f8d9c1ea4b254e6e7e04db532)), work items [#885](https://github.com/Oriflame/lumos/issues/885)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### 4.1.15 - 2021-11-01
|
|
59
|
+
|
|
60
|
+
#### 📦 Dependencies
|
|
61
|
+
|
|
62
|
+
- update dependency eslint to v8 (#827) ([6fcd4ea](https://github.com/Oriflame/lumos/commit/6fcd4ea61532eb05185059d849e2862ff5b27cf0)), work items [#827](https://github.com/Oriflame/lumos/issues/827)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### 4.1.14 - 2021-11-01
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### 4.1.13 - 2021-10-31
|
|
79
|
+
|
|
80
|
+
#### 📦 Dependencies
|
|
81
|
+
|
|
82
|
+
- update dependency @next/eslint-plugin-next to ^12.0.2 (#876) ([9836cfb](https://github.com/Oriflame/lumos/commit/9836cfbacc640c50f4e3beaceedf84a01c6d2e24)), work items [#876](https://github.com/Oriflame/lumos/issues/876)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @oriflame/config-eslint
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
6
90
|
### 4.1.12 - 2021-10-29
|
|
7
91
|
|
|
8
92
|
**Note:** Version bump only for package @oriflame/config-eslint
|
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
export interface ESLintOptions {
|
|
3
|
+
future?: boolean;
|
|
4
|
+
node?: boolean;
|
|
5
|
+
typescript?: boolean;
|
|
6
|
+
nextjs?: boolean;
|
|
7
|
+
prettier?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export { ESLintConfig };
|
|
10
|
+
export declare function getExtendsList({ future, node, typescript, nextjs, prettier, }: ESLintOptions): string[];
|
|
11
|
+
export declare function getIgnoreList(): string[];
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,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;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AAQxB,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"}
|
package/lib/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIgnoreList = exports.getExtendsList = void 0;
|
|
4
|
-
const core_1 = require("@beemo/core");
|
|
5
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
6
|
-
function fromHere(filePath) {
|
|
7
|
-
return `./${new core_1.Path(process.cwd())
|
|
8
|
-
.relativeTo(new core_1.Path(__dirname, '../lib', filePath).resolve())
|
|
9
|
-
.toString()}`;
|
|
10
|
-
}
|
|
11
|
-
function getExtendsList({ future = false, node = false, typescript = false, nextjs = false, prettier = false, }) {
|
|
12
|
-
const paths = [fromHere('./presets/base')];
|
|
13
|
-
if (future) {
|
|
14
|
-
paths.push(fromHere('./presets/future'));
|
|
15
|
-
}
|
|
16
|
-
if (node) {
|
|
17
|
-
paths.push(fromHere('./presets/node'));
|
|
18
|
-
}
|
|
19
|
-
if (typescript) {
|
|
20
|
-
paths.push(fromHere('./presets/typescript'));
|
|
21
|
-
}
|
|
22
|
-
if (nextjs) {
|
|
23
|
-
paths.push(fromHere('./presets/nextjs'));
|
|
24
|
-
}
|
|
25
|
-
if (prettier) {
|
|
26
|
-
paths.push(fromHere('./presets/prettier'));
|
|
27
|
-
}
|
|
28
|
-
return paths;
|
|
29
|
-
}
|
|
30
|
-
exports.getExtendsList = getExtendsList;
|
|
31
|
-
function getIgnoreList() {
|
|
32
|
-
return [
|
|
33
|
-
...lumos_common_1.IGNORE_PATHS,
|
|
34
|
-
'jest.config.js',
|
|
35
|
-
'babel.config.js',
|
|
36
|
-
'webpack.config.js',
|
|
37
|
-
'build*/',
|
|
38
|
-
'\\.eslintrc.js',
|
|
39
|
-
];
|
|
40
|
-
}
|
|
41
|
-
exports.getIgnoreList = getIgnoreList;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIgnoreList = exports.getExtendsList = void 0;
|
|
4
|
+
const core_1 = require("@beemo/core");
|
|
5
|
+
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
6
|
+
function fromHere(filePath) {
|
|
7
|
+
return `./${new core_1.Path(process.cwd())
|
|
8
|
+
.relativeTo(new core_1.Path(__dirname, '../lib', filePath).resolve())
|
|
9
|
+
.toString()}`;
|
|
10
|
+
}
|
|
11
|
+
function getExtendsList({ future = false, node = false, typescript = false, nextjs = false, prettier = false, }) {
|
|
12
|
+
const paths = [fromHere('./presets/base')];
|
|
13
|
+
if (future) {
|
|
14
|
+
paths.push(fromHere('./presets/future'));
|
|
15
|
+
}
|
|
16
|
+
if (node) {
|
|
17
|
+
paths.push(fromHere('./presets/node'));
|
|
18
|
+
}
|
|
19
|
+
if (typescript) {
|
|
20
|
+
paths.push(fromHere('./presets/typescript'));
|
|
21
|
+
}
|
|
22
|
+
if (nextjs) {
|
|
23
|
+
paths.push(fromHere('./presets/nextjs'));
|
|
24
|
+
}
|
|
25
|
+
if (prettier) {
|
|
26
|
+
paths.push(fromHere('./presets/prettier'));
|
|
27
|
+
}
|
|
28
|
+
return paths;
|
|
29
|
+
}
|
|
30
|
+
exports.getExtendsList = getExtendsList;
|
|
31
|
+
function getIgnoreList() {
|
|
32
|
+
return [
|
|
33
|
+
...lumos_common_1.IGNORE_PATHS,
|
|
34
|
+
'jest.config.js',
|
|
35
|
+
'babel.config.js',
|
|
36
|
+
'webpack.config.js',
|
|
37
|
+
'build*/',
|
|
38
|
+
'\\.eslintrc.js',
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
exports.getIgnoreList = getIgnoreList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
-
declare const config: ESLintConfig;
|
|
3
|
-
export = config;
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
declare const config: ESLintConfig;
|
|
3
|
+
export = config;
|
|
4
4
|
//# sourceMappingURL=SECRET_CONFIG_DO_NOT_USE_THIS.d.ts.map
|
|
@@ -1,32 +1,32 @@
|
|
|
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;
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
-
declare const config: ESLintConfig;
|
|
3
|
-
export = config;
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
declare const config: ESLintConfig;
|
|
3
|
+
export = config;
|
|
4
4
|
//# sourceMappingURL=base.d.ts.map
|
package/lib/presets/base.js
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
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-
|
|
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;
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
-
declare const config: ESLintConfig;
|
|
3
|
-
export = config;
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
declare const config: ESLintConfig;
|
|
3
|
+
export = config;
|
|
4
4
|
//# sourceMappingURL=future.d.ts.map
|
package/lib/presets/future.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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;
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
-
declare const config: ESLintConfig;
|
|
3
|
-
export = config;
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
declare const config: ESLintConfig;
|
|
3
|
+
export = config;
|
|
4
4
|
//# sourceMappingURL=nextjs.d.ts.map
|
package/lib/presets/nextjs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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;
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
-
declare const config: ESLintConfig;
|
|
3
|
-
export = config;
|
|
1
|
+
import { ESLintConfig } from '@beemo/driver-eslint';
|
|
2
|
+
declare const config: ESLintConfig;
|
|
3
|
+
export = config;
|
|
4
4
|
//# sourceMappingURL=node.d.ts.map
|