@oriflame/config-eslint 4.1.13 → 4.1.16-alpha.39

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/lib/index.d.ts +11 -9
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +41 -41
  5. package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts +3 -3
  6. package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.js +32 -32
  7. package/lib/presets/base.d.ts +3 -3
  8. package/lib/presets/base.js +120 -120
  9. package/lib/presets/future.d.ts +3 -3
  10. package/lib/presets/future.js +13 -13
  11. package/lib/presets/nextjs.d.ts +3 -3
  12. package/lib/presets/nextjs.js +13 -13
  13. package/lib/presets/node.d.ts +3 -3
  14. package/lib/presets/node.js +26 -26
  15. package/lib/presets/prettier.d.ts +3 -3
  16. package/lib/presets/prettier.js +13 -13
  17. package/lib/presets/typescript.d.ts +3 -3
  18. package/lib/presets/typescript.js +40 -40
  19. package/lib/resolvers/graphql.d.ts +5 -5
  20. package/lib/resolvers/graphql.js +12 -12
  21. package/lib/rules/a11y.d.ts +3 -3
  22. package/lib/rules/a11y.d.ts.map +1 -1
  23. package/lib/rules/a11y.js +46 -45
  24. package/lib/rules/eslint-comments.d.ts +3 -3
  25. package/lib/rules/eslint-comments.d.ts.map +1 -1
  26. package/lib/rules/eslint-comments.js +15 -14
  27. package/lib/rules/eslint.d.ts +3 -3
  28. package/lib/rules/eslint.d.ts.map +1 -1
  29. package/lib/rules/eslint.js +386 -385
  30. package/lib/rules/import.d.ts +3 -3
  31. package/lib/rules/import.d.ts.map +1 -1
  32. package/lib/rules/import.js +77 -76
  33. package/lib/rules/jest.d.ts +3 -3
  34. package/lib/rules/jest.d.ts.map +1 -1
  35. package/lib/rules/jest.js +60 -59
  36. package/lib/rules/nextjs.d.ts +3 -3
  37. package/lib/rules/nextjs.d.ts.map +1 -1
  38. package/lib/rules/nextjs.js +18 -17
  39. package/lib/rules/node.d.ts +3 -3
  40. package/lib/rules/node.d.ts.map +1 -1
  41. package/lib/rules/node.js +46 -45
  42. package/lib/rules/prettier.d.ts +3 -3
  43. package/lib/rules/prettier.d.ts.map +1 -1
  44. package/lib/rules/prettier.js +7 -6
  45. package/lib/rules/promise.d.ts +3 -3
  46. package/lib/rules/promise.d.ts.map +1 -1
  47. package/lib/rules/promise.js +25 -24
  48. package/lib/rules/react-hooks.d.ts +3 -3
  49. package/lib/rules/react-hooks.d.ts.map +1 -1
  50. package/lib/rules/react-hooks.js +8 -7
  51. package/lib/rules/react.d.ts +3 -3
  52. package/lib/rules/react.d.ts.map +1 -1
  53. package/lib/rules/react.js +144 -143
  54. package/lib/rules/testing-library.d.ts +3 -3
  55. package/lib/rules/testing-library.d.ts.map +1 -1
  56. package/lib/rules/testing-library.js +32 -31
  57. package/lib/rules/typescript.d.ts +3 -3
  58. package/lib/rules/typescript.d.ts.map +1 -1
  59. package/lib/rules/typescript.js +370 -369
  60. package/lib/rules/unicorn.d.ts +3 -3
  61. package/lib/rules/unicorn.d.ts.map +1 -1
  62. package/lib/rules/unicorn.js +106 -105
  63. package/package.json +20 -18
  64. package/src/index.ts +3 -0
  65. package/src/presets/base.ts +1 -1
  66. package/src/rules/a11y.ts +1 -1
  67. package/src/rules/eslint-comments.ts +1 -1
  68. package/src/rules/eslint.ts +1 -1
  69. package/src/rules/import.ts +1 -1
  70. package/src/rules/jest.ts +2 -2
  71. package/src/rules/nextjs.ts +2 -2
  72. package/src/rules/node.ts +1 -1
  73. package/src/rules/prettier.ts +1 -1
  74. package/src/rules/promise.ts +1 -1
  75. package/src/rules/react-hooks.ts +1 -1
  76. package/src/rules/react.ts +1 -1
  77. package/src/rules/testing-library.ts +1 -1
  78. package/src/rules/typescript.ts +1 -1
  79. package/src/rules/unicorn.ts +1 -1
  80. package/tsconfig.tsbuildinfo +1 -1
@@ -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=prettier.d.ts.map
@@ -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 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
+ "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,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=typescript.d.ts.map
@@ -1,40 +1,40 @@
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
+ "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,6 +1,6 @@
1
- export declare const interfaceVersion = 2;
2
- export declare function resolve(source: string): {
3
- found: boolean;
4
- path?: unknown;
5
- };
1
+ export declare const interfaceVersion = 2;
2
+ export declare function resolve(source: string): {
3
+ found: boolean;
4
+ path?: unknown;
5
+ };
6
6
  //# sourceMappingURL=graphql.d.ts.map
@@ -1,12 +1,12 @@
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;
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;
@@ -1,4 +1,4 @@
1
- import { ESLintConfig } from '@beemo/driver-eslint';
2
- declare const config: ESLintConfig['rules'];
3
- export = config;
1
+ import { ESLintConfig } from '@beemo/driver-eslint';
2
+ declare const config: ESLintConfig['rules'];
3
+ export default config;
4
4
  //# sourceMappingURL=a11y.d.ts.map
@@ -1 +1 @@
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"}
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,eAAe,MAAM,CAAC"}
package/lib/rules/a11y.js CHANGED
@@ -1,45 +1,46 @@
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
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config = {
4
+ // eslint-plugin-jsx-a11y rules
5
+ 'jsx-a11y/alt-text': 'warn',
6
+ 'jsx-a11y/anchor-has-content': ['warn', { components: ['Link'] }],
7
+ 'jsx-a11y/anchor-is-valid': [
8
+ 'error',
9
+ {
10
+ components: ['Link'],
11
+ specialLink: ['hrefLeft', 'hrefRight', 'to'],
12
+ },
13
+ ],
14
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
15
+ 'jsx-a11y/aria-props': 'error',
16
+ 'jsx-a11y/aria-proptypes': 'error',
17
+ 'jsx-a11y/aria-role': ['error', { ignoreNonDOM: false }],
18
+ 'jsx-a11y/aria-unsupported-elements': 'error',
19
+ 'jsx-a11y/autocomplete-valid': 'warn',
20
+ 'jsx-a11y/click-events-have-key-events': 'warn',
21
+ 'jsx-a11y/control-has-associated-label': 'warn',
22
+ 'jsx-a11y/heading-has-content': ['warn', { components: ['Typography'] }],
23
+ 'jsx-a11y/html-has-lang': 'warn',
24
+ 'jsx-a11y/iframe-has-title': 'warn',
25
+ 'jsx-a11y/img-redundant-alt': 'warn',
26
+ 'jsx-a11y/interactive-supports-focus': 'warn',
27
+ 'jsx-a11y/label-has-associated-control': 'warn',
28
+ 'jsx-a11y/lang': 'error',
29
+ 'jsx-a11y/media-has-caption': 'warn',
30
+ 'jsx-a11y/mouse-events-have-key-events': 'warn',
31
+ 'jsx-a11y/no-access-key': 'warn',
32
+ 'jsx-a11y/no-autofocus': 'off',
33
+ 'jsx-a11y/no-distracting-elements': 'error',
34
+ 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn',
35
+ 'jsx-a11y/no-noninteractive-element-interactions': 'warn',
36
+ 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn',
37
+ 'jsx-a11y/no-noninteractive-tabindex': 'error',
38
+ 'jsx-a11y/no-onchange': 'warn',
39
+ 'jsx-a11y/no-redundant-roles': 'error',
40
+ 'jsx-a11y/no-static-element-interactions': 'warn',
41
+ 'jsx-a11y/role-has-required-aria-props': 'error',
42
+ 'jsx-a11y/role-supports-aria-props': 'error',
43
+ 'jsx-a11y/scope': 'error',
44
+ 'jsx-a11y/tabindex-no-positive': 'error', // enforce tabIndex value is not greater than zero
45
+ };
46
+ exports.default = config;
@@ -1,4 +1,4 @@
1
- import { ESLintConfig } from '@beemo/driver-eslint';
2
- declare const config: ESLintConfig['rules'];
3
- export = config;
1
+ import { ESLintConfig } from '@beemo/driver-eslint';
2
+ declare const config: ESLintConfig['rules'];
3
+ export default config;
4
4
  //# sourceMappingURL=eslint-comments.d.ts.map
@@ -1 +1 @@
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
+ {"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,eAAe,MAAM,CAAC"}
@@ -1,14 +1,15 @@
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;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config = {
4
+ // eslint-plugin-eslint-comments rules
5
+ 'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
6
+ 'eslint-comments/no-aggregating-enable': 'error',
7
+ 'eslint-comments/no-duplicate-disable': 'error',
8
+ 'eslint-comments/no-restricted-disable': 'off',
9
+ 'eslint-comments/no-unlimited-disable': 'error',
10
+ 'eslint-comments/no-unused-disable': 'off',
11
+ 'eslint-comments/no-unused-enable': 'error',
12
+ 'eslint-comments/no-use': 'off',
13
+ 'eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }], // require include descriptions in ESLint directive-comments
14
+ };
15
+ exports.default = config;
@@ -1,4 +1,4 @@
1
- import { ESLintConfig } from '@beemo/driver-eslint';
2
- declare const config: ESLintConfig['rules'];
3
- export = config;
1
+ import { ESLintConfig } from '@beemo/driver-eslint';
2
+ declare const config: ESLintConfig['rules'];
3
+ export default config;
4
4
  //# sourceMappingURL=eslint.d.ts.map
@@ -1 +1 @@
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"}
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,eAAe,MAAM,CAAC"}