@playcanvas/eslint-config 1.0.14 → 1.1.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/README.md +13 -0
- package/index.js +9 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,19 @@ The configuration is defined in [`index.js`][index]. It configures ESLint's rule
|
|
|
6
6
|
|
|
7
7
|
The configuration attempts to enable as many rules as possible, particularly those categorized as 'recommended' by ESLint.
|
|
8
8
|
|
|
9
|
+
## Using this config in your own projects
|
|
10
|
+
|
|
11
|
+
Edit your project's `package.json` file:
|
|
12
|
+
|
|
13
|
+
1. Add `eslint` and `@playcanvas/eslint-config` to your `devDependencies` section.
|
|
14
|
+
2. Add an `eslintConfig` section. At a minimum, you will need:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
"eslintConfig": {
|
|
18
|
+
"extends": "@playcanvas/eslint-config"
|
|
19
|
+
},
|
|
20
|
+
```
|
|
21
|
+
|
|
9
22
|
[engine]: https://github.com/playcanvas/engine
|
|
10
23
|
[index]: https://github.com/playcanvas/playcanvas-eslint-config/blob/master/index.js
|
|
11
24
|
[rules]: https://eslint.org/docs/rules/
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
|
|
3
3
|
"parserOptions": {
|
|
4
|
-
"ecmaVersion":
|
|
4
|
+
"ecmaVersion": "latest",
|
|
5
5
|
"sourceType": "module",
|
|
6
6
|
"ecmaFeatures": {}
|
|
7
7
|
},
|
|
@@ -58,7 +58,7 @@ module.exports = {
|
|
|
58
58
|
"no-unexpected-multiline": "error",
|
|
59
59
|
"no-unmodified-loop-condition": "error",
|
|
60
60
|
"no-unreachable": "error",
|
|
61
|
-
"no-unreachable-loop": "
|
|
61
|
+
"no-unreachable-loop": "error",
|
|
62
62
|
"no-unsafe-finally": "error",
|
|
63
63
|
"no-unsafe-negation": "error",
|
|
64
64
|
"no-unsafe-optional-chaining": "error",
|
|
@@ -97,7 +97,7 @@ module.exports = {
|
|
|
97
97
|
"func-name-matching": "error",
|
|
98
98
|
"func-names": "off",
|
|
99
99
|
"func-style": "off",
|
|
100
|
-
"grouped-accessor-pairs": "error",
|
|
100
|
+
"grouped-accessor-pairs": ["error", "setBeforeGet"],
|
|
101
101
|
"guard-for-in": "off",
|
|
102
102
|
"id-denylist": "off",
|
|
103
103
|
"id-length": "off",
|
|
@@ -384,24 +384,20 @@ module.exports = {
|
|
|
384
384
|
"jsdoc/check-alignment": "error",
|
|
385
385
|
"jsdoc/check-examples": "off",
|
|
386
386
|
"jsdoc/check-indentation": "off",
|
|
387
|
-
"jsdoc/check-line-alignment": "
|
|
387
|
+
"jsdoc/check-line-alignment": "error",
|
|
388
388
|
"jsdoc/check-param-names": "off",
|
|
389
389
|
"jsdoc/check-property-names": "error",
|
|
390
390
|
"jsdoc/check-syntax": "error",
|
|
391
|
-
"jsdoc/check-tag-names":
|
|
392
|
-
"error", {
|
|
393
|
-
"definedTags": ["component", "field"]
|
|
394
|
-
}
|
|
395
|
-
],
|
|
391
|
+
"jsdoc/check-tag-names": "error",
|
|
396
392
|
"jsdoc/check-types": "error",
|
|
397
393
|
"jsdoc/check-values": "error",
|
|
398
394
|
"jsdoc/empty-tags": "error",
|
|
399
395
|
"jsdoc/implements-on-classes": "error",
|
|
400
396
|
"jsdoc/match-description": "off",
|
|
401
397
|
"jsdoc/match-name": "off",
|
|
402
|
-
"jsdoc/multiline-blocks": "
|
|
398
|
+
"jsdoc/multiline-blocks": "error",
|
|
403
399
|
"jsdoc/newline-after-description": "error",
|
|
404
|
-
"jsdoc/no-bad-blocks": "
|
|
400
|
+
"jsdoc/no-bad-blocks": "error",
|
|
405
401
|
"jsdoc/no-defaults": "off",
|
|
406
402
|
"jsdoc/no-missing-syntax": "off",
|
|
407
403
|
"jsdoc/no-multi-asterisks": "error",
|
|
@@ -432,8 +428,8 @@ module.exports = {
|
|
|
432
428
|
"jsdoc/require-returns-type": "error",
|
|
433
429
|
"jsdoc/require-returns": "error",
|
|
434
430
|
"jsdoc/require-throws": "off",
|
|
435
|
-
"jsdoc/require-yields": "
|
|
436
|
-
"jsdoc/require-yields-check": "
|
|
431
|
+
"jsdoc/require-yields": "error",
|
|
432
|
+
"jsdoc/require-yields-check": "error",
|
|
437
433
|
"jsdoc/tag-lines": "off",
|
|
438
434
|
"jsdoc/valid-types": "off"
|
|
439
435
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcanvas/eslint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": "PlayCanvas <support@playcanvas.com>",
|
|
5
5
|
"homepage": "https://playcanvas.com",
|
|
6
6
|
"description": "ESLint configuration used by PlayCanvas",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"eslint-plugin-jsdoc": "^
|
|
29
|
+
"eslint-plugin-jsdoc": "^38.0.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"test": "echo \"Error: no test specified\" && exit 1"
|