@wildpastry/eslint-config 1.6.1 → 1.6.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/.eslintrc +1 -1
- package/README.md +9 -4
- package/index.js +1 -1
- package/package.json +1 -1
package/.eslintrc
CHANGED
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
// Other
|
|
292
292
|
"line-comment-position": 1, // enforce position of line comments // DONE
|
|
293
293
|
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE - OFF
|
|
294
|
-
"max-len": [1, { "code": 80, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
294
|
+
"max-len": [1, { "code": 80, "ignoreUrls": true, "ignoreComments": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
295
295
|
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
296
296
|
"padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
|
|
297
297
|
"no-cond-assign": 1, // disallow assignment in conditional expressions // DONE
|
package/README.md
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
# ESLintConfig
|
|
2
|
-
Shareable ESLint configuration settings.
|
|
2
|
+
Shareable ESLint configuration settings linked with Prettier. ESLint formatting rules are disabled, then re-enabled through the eslint-prettier plugin. This way the formatting rules still get applied and Prettier formatting won't conflict with ESLint linting.
|
|
3
|
+
|
|
4
|
+
No errors, only warnings.
|
|
3
5
|
|
|
4
6
|
## Prerequisites
|
|
7
|
+
- NodeJS and NPM installed
|
|
8
|
+
- Project set up with NodeJS and a package.json
|
|
5
9
|
- Navigate to the root directory of your project
|
|
6
10
|
|
|
7
11
|
## Installation and usage
|
|
8
12
|
|
|
9
|
-
### Install eslint and prettier
|
|
13
|
+
### Install eslint and prettier core packages
|
|
10
14
|
```
|
|
11
15
|
npm i eslint@latest prettier@latest
|
|
12
16
|
```
|
|
13
17
|
|
|
14
|
-
### Install eslint
|
|
18
|
+
### Install eslint plugins
|
|
15
19
|
```
|
|
16
20
|
npm i @typescript-eslint/eslint-plugin@latest eslint-plugin-react@latest eslint-plugin-prettier@latest
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
### Install eslint config
|
|
23
|
+
### Install @wildpastry custom eslint config
|
|
20
24
|
```
|
|
21
25
|
npm i @wildpastry/eslint-config@latest
|
|
22
26
|
```
|
|
@@ -32,6 +36,7 @@ add { "extends": "@wildpastry/eslint-config" } into .eslintrc and save
|
|
|
32
36
|
```
|
|
33
37
|
|
|
34
38
|
### Add these optional scripts to package.json
|
|
39
|
+
These scripts will check/fix linting and formatting. Not everything can be automatically fixed.
|
|
35
40
|
```
|
|
36
41
|
"scripts": {
|
|
37
42
|
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
package/index.js
CHANGED
|
@@ -280,7 +280,7 @@ module.exports = {
|
|
|
280
280
|
// Other
|
|
281
281
|
"line-comment-position": 1, // enforce position of line comments // DONE
|
|
282
282
|
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE - OFF
|
|
283
|
-
"max-len": [1, { "code": 80, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
283
|
+
"max-len": [1, { "code": 80, "ignoreUrls": true, "ignoreComments": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
284
284
|
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
285
285
|
"padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
|
|
286
286
|
"no-cond-assign": 1, // disallow assignment in conditional expressions // DONE
|