@apolitical/eslint-config 1.0.1 → 2.0.0-rc.0
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 +16 -0
- package/README.md +2 -2
- package/api.config.js +14 -0
- package/package.json +16 -17
- package/ui.config.js +31 -0
- package/base.config.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ 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
|
+
|
|
20
|
+
## [1.0.2] - 2022-01-31
|
|
21
|
+
### Fixed
|
|
22
|
+
- Node.js version
|
|
23
|
+
|
|
8
24
|
## [1.0.1] - 2022-01-20
|
|
9
25
|
### Fixed
|
|
10
26
|
- Pipeline node version
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Apolitical Eslint Config
|
|
2
2
|
|
|
3
|
-
Apolitical ESLint
|
|
3
|
+
Apolitical ESLint configurations for Node projects
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
7
|
Requires the following to run:
|
|
8
8
|
|
|
9
|
-
- [node.js][node] 16.13.
|
|
9
|
+
- [node.js][node] 16.13.0+
|
|
10
10
|
- [yarn][yarn]
|
|
11
11
|
|
|
12
12
|
[node]: https://nodejs.org/en/download/
|
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,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/eslint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Apolitical ESLint
|
|
3
|
+
"version": "2.0.0-rc.0",
|
|
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
|
-
"prettier.config.js"
|
|
9
|
+
"api.config.js",
|
|
10
|
+
"prettier.config.js",
|
|
11
|
+
"ui.config.js"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"test": "exit 0",
|
|
@@ -22,20 +23,18 @@
|
|
|
22
23
|
"Node Modules"
|
|
23
24
|
],
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"eslint": "8.
|
|
26
|
-
"eslint-config-prettier": "8.
|
|
27
|
-
"eslint-plugin-jest": "
|
|
28
|
-
"
|
|
29
|
-
"prettier": "2.5.1"
|
|
26
|
+
"eslint": "8.11.0",
|
|
27
|
+
"eslint-config-prettier": "8.5.0",
|
|
28
|
+
"eslint-plugin-jest": "26.1.1",
|
|
29
|
+
"prettier": "2.6.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"eslint": "8.
|
|
33
|
-
"eslint-config-prettier": "8.
|
|
34
|
-
"eslint-plugin-jest": "
|
|
35
|
-
"
|
|
36
|
-
"prettier": "2.5.1"
|
|
32
|
+
"eslint": "8.11.0",
|
|
33
|
+
"eslint-config-prettier": "8.5.0",
|
|
34
|
+
"eslint-plugin-jest": "26.1.1",
|
|
35
|
+
"prettier": "2.6.0"
|
|
37
36
|
},
|
|
38
37
|
"engines": {
|
|
39
|
-
"node": ">=16.13.
|
|
38
|
+
"node": ">=16.13.0"
|
|
40
39
|
}
|
|
41
|
-
}
|
|
40
|
+
}
|
package/ui.config.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
},
|
|
30
|
+
"ignorePatterns": ["locales"]
|
|
31
|
+
};
|
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
|
-
};
|