eslint-plugin-crisp 1.1.2 → 1.1.4
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 +25 -18
- package/package.json +2 -2
- package/recommended-vue.js +12 -6
- package/recommended.js +11 -5
package/README.md
CHANGED
|
@@ -10,21 +10,28 @@ A set of custom [ESLint](https://eslint.org/) configurations and rules for Crisp
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
The plugin provides two configurations:
|
|
13
|
-
* `
|
|
14
|
-
* `
|
|
13
|
+
* `recommended`: JS rules targetting backend code (Node.js)
|
|
14
|
+
* `recommended-vue`: JS rules targetting frontend code (Vue.js)
|
|
15
|
+
import crisp from "eslint-plugin-crisp";
|
|
16
|
+
|
|
17
|
+
/**************************************************************************
|
|
18
|
+
* CONFIGURATION
|
|
19
|
+
***************************************************************************/
|
|
15
20
|
|
|
16
21
|
Add the plugin in your ESLint config object, then extend the desired configuration:
|
|
17
22
|
```javascript
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
23
|
+
import crisp from "eslint-plugin-crisp";
|
|
24
|
+
|
|
25
|
+
export default defineConfig([
|
|
26
|
+
crisp.configs["recommended"],
|
|
27
|
+
// OR crisp.configs["recommended-vue"]
|
|
28
|
+
|
|
29
|
+
{
|
|
30
|
+
rules: {
|
|
31
|
+
// Rules override
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]);
|
|
28
35
|
```
|
|
29
36
|
|
|
30
37
|
## Documentation
|
|
@@ -32,17 +39,17 @@ Add the plugin in your ESLint config object, then extend the desired configurati
|
|
|
32
39
|
This is the list of plugins and rules used by ESLint Plugin Crisp, and what they do.
|
|
33
40
|
|
|
34
41
|
Each item has emojis denoting:
|
|
35
|
-
* 🟠: enabled in `
|
|
36
|
-
* 🟢: enabled in `
|
|
42
|
+
* 🟠: enabled in `recommended`
|
|
43
|
+
* 🟢: enabled in `recommended-vue`
|
|
37
44
|
|
|
38
45
|
### Configurations
|
|
39
46
|
|
|
40
47
|
| Name | Description | 🟠 | 🟢 |
|
|
41
48
|
| :- | :- | :- | :- |
|
|
42
|
-
| [eslint:recommended](https://github.com/eslint/eslint) | Core ESLint rules | | 🟢 |
|
|
43
|
-
| [plugin:
|
|
44
|
-
| [plugin:
|
|
45
|
-
| [plugin
|
|
49
|
+
| [@eslint/js:recommended](https://github.com/eslint/eslint/tree/main/packages/js) | Core ESLint rules | | 🟢 |
|
|
50
|
+
| [eslint-plugin-jsdoc:recommended](https://github.com/gajus/eslint-plugin-jsdoc) | JSDoc linting rules | 🟠 | 🟢 |
|
|
51
|
+
| [eslint-plugin-vue:recommended](https://github.com/vuejs/eslint-plugin-vue) | Vue.js 3 linting rules | | 🟢 |
|
|
52
|
+
| [eslint-plugin-vue-pug:recommended](https://github.com/gajus/eslint-plugin-jsdoc) | Pug templates support for Vue.js linting rules | | 🟢 |
|
|
46
53
|
|
|
47
54
|
### Plugins
|
|
48
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-crisp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Custom ESLint Rules for Crisp",
|
|
5
5
|
"author": "Crisp IM SAS",
|
|
6
6
|
"main": "index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"doctrine": "3.0.0",
|
|
18
|
-
"eslint-plugin-jsdoc": "
|
|
18
|
+
"eslint-plugin-jsdoc": "50.8.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"eslint": "9.29.0",
|
package/recommended-vue.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import globals from "globals";
|
|
2
2
|
import pluginJS from "@eslint/js";
|
|
3
|
-
|
|
3
|
+
import pluginJSDoc from "eslint-plugin-jsdoc";
|
|
4
4
|
import pluginVue from "eslint-plugin-vue";
|
|
5
5
|
import pluginVuePug from "eslint-plugin-vue-pug";
|
|
6
6
|
|
|
7
|
-
export default function configRecommendedVue(
|
|
7
|
+
export default function configRecommendedVue(pluginCrisp) {
|
|
8
8
|
return [
|
|
9
9
|
pluginJS.configs.recommended,
|
|
10
|
-
|
|
10
|
+
pluginJSDoc.configs["flat/recommended"],
|
|
11
11
|
pluginVue.configs["flat/recommended"],
|
|
12
12
|
pluginVuePug.configs["flat/recommended"],
|
|
13
13
|
|
|
14
14
|
{
|
|
15
|
+
files: [
|
|
16
|
+
"*.js", "**/*.js",
|
|
17
|
+
"*.vue", "**/*.vue"
|
|
18
|
+
],
|
|
19
|
+
|
|
15
20
|
languageOptions: {
|
|
21
|
+
ecmaVersion: 11,
|
|
22
|
+
|
|
16
23
|
globals: {
|
|
17
24
|
...globals.browser,
|
|
18
25
|
...globals.node
|
|
@@ -20,11 +27,10 @@ export default function configRecommendedVue(plugin) {
|
|
|
20
27
|
},
|
|
21
28
|
|
|
22
29
|
plugins: {
|
|
23
|
-
|
|
24
|
-
"crisp":
|
|
30
|
+
"jsdoc": pluginJSDoc,
|
|
31
|
+
"crisp": pluginCrisp
|
|
25
32
|
},
|
|
26
33
|
|
|
27
|
-
|
|
28
34
|
settings: {
|
|
29
35
|
jsdoc: {
|
|
30
36
|
tagNamePreference: {
|
package/recommended.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import globals from "globals";
|
|
2
|
-
|
|
2
|
+
import pluginJSDoc from "eslint-plugin-jsdoc";
|
|
3
3
|
|
|
4
|
-
export default function configRecommended(
|
|
4
|
+
export default function configRecommended(pluginCrisp) {
|
|
5
5
|
return [
|
|
6
|
-
|
|
6
|
+
pluginJSDoc.configs["flat/recommended"],
|
|
7
7
|
|
|
8
8
|
{
|
|
9
|
+
files: [
|
|
10
|
+
"*.js", "**/*.js"
|
|
11
|
+
],
|
|
12
|
+
|
|
9
13
|
languageOptions: {
|
|
14
|
+
ecmaVersion: 11,
|
|
15
|
+
|
|
10
16
|
globals: {
|
|
11
17
|
...globals.browser,
|
|
12
18
|
...globals.node
|
|
@@ -14,8 +20,8 @@ export default function configRecommended(plugin) {
|
|
|
14
20
|
},
|
|
15
21
|
|
|
16
22
|
plugins: {
|
|
17
|
-
|
|
18
|
-
"crisp":
|
|
23
|
+
"jsdoc": pluginJSDoc,
|
|
24
|
+
"crisp": pluginCrisp
|
|
19
25
|
},
|
|
20
26
|
|
|
21
27
|
settings: {
|