@apolitical/eslint-config 1.0.2 → 2.0.0-rc.2
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 +12 -0
- package/README.md +6 -1
- package/api.config.js +14 -0
- package/eslint.settings.js +12 -0
- package/package.json +16 -16
- package/ui.config.js +34 -0
- package/base.config.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.0] - 2022-03-18
|
|
9
|
+
### Added
|
|
10
|
+
- eslint-config-prettier
|
|
11
|
+
- eslint configurations for react
|
|
12
|
+
- eslint.settings.js
|
|
13
|
+
### Deprecated
|
|
14
|
+
- eslint-plugin-prettier
|
|
15
|
+
### Changed
|
|
16
|
+
- ecmaScript version to 2021
|
|
17
|
+
- packege version for: 'eslint', 'prettier', 'eslint-plugin-jest',
|
|
18
|
+
- 'base.config.js' to 'api.config.js'
|
|
19
|
+
|
|
8
20
|
## [1.0.2] - 2022-01-31
|
|
9
21
|
### Fixed
|
|
10
22
|
- Node.js version
|
package/README.md
CHANGED
|
@@ -25,8 +25,13 @@ yarn add -D @apolitical/eslint-config
|
|
|
25
25
|
Link the ESLint configurations from your `package.json`:
|
|
26
26
|
|
|
27
27
|
```json
|
|
28
|
+
// for node modules
|
|
28
29
|
"eslintConfig": {
|
|
29
|
-
"extends": "@apolitical/eslint-config/
|
|
30
|
+
"extends": "@apolitical/eslint-config/api.config"
|
|
31
|
+
},
|
|
32
|
+
// in react applications
|
|
33
|
+
"eslintConfig": {
|
|
34
|
+
"extends": "@apolitical/eslint-config/ui.config"
|
|
30
35
|
},
|
|
31
36
|
"prettier": "@apolitical/eslint-config/prettier.config",
|
|
32
37
|
```
|
package/api.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const { parserOptions, env, commonRules } = require('./eslint.settings');
|
|
3
|
+
|
|
4
|
+
env.node = true
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
parserOptions,
|
|
8
|
+
env,
|
|
9
|
+
"extends": [
|
|
10
|
+
...commonRules,
|
|
11
|
+
"plugin:jest/recommended"
|
|
12
|
+
],
|
|
13
|
+
"plugins": ["jest"]
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/eslint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Apolitical ESLint
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
|
+
"description": "Apolitical ESLint and Prettier configurations",
|
|
5
5
|
"author": "Apolitical Group Limited <engineering@apolitical.co>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "
|
|
7
|
+
"main": "api.config.js",
|
|
8
8
|
"files": [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"api.config.js",
|
|
10
|
+
"eslint.settings.js",
|
|
11
|
+
"prettier.config.js",
|
|
12
|
+
"ui.config.js"
|
|
11
13
|
],
|
|
12
14
|
"scripts": {
|
|
13
15
|
"test": "exit 0",
|
|
@@ -22,20 +24,18 @@
|
|
|
22
24
|
"Node Modules"
|
|
23
25
|
],
|
|
24
26
|
"dependencies": {
|
|
25
|
-
"eslint": "8.
|
|
26
|
-
"eslint-config-prettier": "8.
|
|
27
|
-
"eslint-plugin-jest": "26.
|
|
28
|
-
"
|
|
29
|
-
"prettier": "2.5.1"
|
|
27
|
+
"eslint": "8.11.0",
|
|
28
|
+
"eslint-config-prettier": "8.5.0",
|
|
29
|
+
"eslint-plugin-jest": "26.1.1",
|
|
30
|
+
"prettier": "2.6.0"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
|
-
"eslint": "8.
|
|
33
|
-
"eslint-config-prettier": "8.
|
|
34
|
-
"eslint-plugin-jest": "26.
|
|
35
|
-
"
|
|
36
|
-
"prettier": "2.5.1"
|
|
33
|
+
"eslint": "8.11.0",
|
|
34
|
+
"eslint-config-prettier": "8.5.0",
|
|
35
|
+
"eslint-plugin-jest": "26.1.1",
|
|
36
|
+
"prettier": "2.6.0"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=16.13.0"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|
package/ui.config.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { parserOptions: ps, env, commonRules } = require('./eslint.settings');
|
|
4
|
+
|
|
5
|
+
const parserOptions = Object.assign(ps,
|
|
6
|
+
{
|
|
7
|
+
"sourceType": "module",
|
|
8
|
+
"ecmaFeatures": {
|
|
9
|
+
"jsx": true
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
env.browser = true;
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
parserOptions,
|
|
18
|
+
env,
|
|
19
|
+
"extends": [
|
|
20
|
+
...commonRules,
|
|
21
|
+
"react-app",
|
|
22
|
+
"react-app/jest"
|
|
23
|
+
],
|
|
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"
|
|
32
|
+
},
|
|
33
|
+
"ignorePatterns": ["locales"]
|
|
34
|
+
};
|
package/base.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
"extends": [
|
|
5
|
-
"eslint:recommended",
|
|
6
|
-
"plugin:prettier/recommended",
|
|
7
|
-
"plugin:jest/recommended"
|
|
8
|
-
],
|
|
9
|
-
"env": {
|
|
10
|
-
"node": true,
|
|
11
|
-
"es6": true,
|
|
12
|
-
"jest": true
|
|
13
|
-
},
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"ecmaVersion": 2018
|
|
16
|
-
},
|
|
17
|
-
"plugins": ["jest"]
|
|
18
|
-
};
|