@apolitical/eslint-config 2.0.0-rc.2 → 2.0.0-rc.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/api.config.js CHANGED
@@ -1,14 +1,16 @@
1
- "use strict";
2
- const { parserOptions, env, commonRules } = require('./eslint.settings');
3
-
4
- env.node = true
1
+ 'use strict';
2
+ const { commonRules, env, rules, parserOptions } = require('./base.settings');
5
3
 
6
4
  module.exports = {
7
5
  parserOptions,
8
- env,
9
- "extends": [
6
+ 'env': {
7
+ ...env,
8
+ node: true,
9
+ },
10
+ 'extends': [
10
11
  ...commonRules,
11
- "plugin:jest/recommended"
12
+ 'plugin:jest/recommended'
12
13
  ],
13
- "plugins": ["jest"]
14
+ 'plugins': ['jest'],
15
+ rules,
14
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/eslint-config",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.3",
4
4
  "description": "Apolitical ESLint and Prettier configurations",
5
5
  "author": "Apolitical Group Limited <engineering@apolitical.co>",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "eslint": "8.11.0",
28
28
  "eslint-config-prettier": "8.5.0",
29
- "eslint-plugin-jest": "26.1.1",
29
+ "eslint-plugin-jest": "26.1.3",
30
30
  "prettier": "2.6.0"
31
31
  },
32
32
  "peerDependencies": {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- "useTabs": false,
5
- "printWidth": 120,
6
- "tabWidth": 2,
7
- "singleQuote": true,
8
- "trailingComma": "all"
4
+ 'useTabs': false,
5
+ 'printWidth': 120,
6
+ 'tabWidth': 2,
7
+ 'singleQuote': true,
8
+ 'trailingComma': 'all'
9
9
  };
package/ui.config.js CHANGED
@@ -1,34 +1,33 @@
1
- "use strict";
1
+ 'use strict';
2
2
 
3
- const { parserOptions: ps, env, commonRules } = require('./eslint.settings');
3
+ const { commonRules, env, parserOptions, rules } = require('./base.settings');
4
4
 
5
- const parserOptions = Object.assign(ps,
6
- {
7
- "sourceType": "module",
8
- "ecmaFeatures": {
9
- "jsx": true
5
+ module.exports = {
6
+ parserOptions: {
7
+ ...parserOptions,
8
+ 'sourceType': 'module',
9
+ 'ecmaFeatures': {
10
+ 'jsx': true
10
11
  }
11
- }
12
- );
13
-
14
- env.browser = true;
15
12
 
16
- module.exports = {
17
- parserOptions,
18
- env,
19
- "extends": [
13
+ },
14
+ env: {
15
+ ...env,
16
+ browser: true
17
+ },
18
+ 'extends': [
20
19
  ...commonRules,
21
- "react-app",
22
- "react-app/jest"
20
+ 'react-app',
21
+ 'react-app/jest'
23
22
  ],
24
- "rules": {
25
- "strict": ["error", "never"],
26
- "no-duplicate-imports": "warn",
27
- "no-empty-function": "warn",
28
- "no-return-await": "error",
29
- "react-hooks/exhaustive-deps": "off",
30
- "testing-library/no-render-in-setup": "warn",
31
- "testing-library/prefer-screen-queries": "warn"
23
+ 'rules': {
24
+ ...rules,
25
+ 'strict': ['error', 'never'],
26
+ 'no-duplicate-imports': 'warn',
27
+ 'no-empty-function': 'warn',
28
+ 'react-hooks/exhaustive-deps': 'off',
29
+ 'testing-library/no-render-in-setup': 'warn',
30
+ 'testing-library/prefer-screen-queries': 'warn'
32
31
  },
33
- "ignorePatterns": ["locales"]
32
+ 'ignorePatterns': ['locales']
34
33
  };
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- module.exports = {
4
- "env": {
5
- "es2021": true,
6
- "jest": true
7
- },
8
- "parserOptions": {
9
- "ecmaVersion": 2021
10
- },
11
- "commonRules": ["eslint:recommended", "eslint-config-prettier"]
12
- }