You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove all configs except as needed to cover project-defined rules
- Testing: Change from broken use of "category" to relying on custom `meta.version` for determination of ES version (eslint docs allowing for customization within `meta`)
- Linting as per latest prettier
- Update devDeps
@@ -25,88 +25,10 @@ Write in your ESLint configurations: http://eslint.org/docs/user-guide/configuri
25
25
26
26
### Configs
27
27
28
-
-`plugin:@mysticatea/es2020` ... Basic configuration for ES2020.
29
-
-`plugin:@mysticatea/es2019` ... Basic configuration for ES2019.
30
-
-`plugin:@mysticatea/es2018` ... Basic configuration for ES2018.
31
-
-`plugin:@mysticatea/es2017` ... Basic configuration for ES2017.
32
-
-`plugin:@mysticatea/es2016` ... Basic configuration for ES2016.
33
-
-`plugin:@mysticatea/es2015` ... Basic configuration for ES2015.
34
-
-`plugin:@mysticatea/es5` ... Basic configuration for ES5.
35
-
-`plugin:@mysticatea/+modules` ... Additional configuration for ES modules.
36
-
-`plugin:@mysticatea/+browser` ... Additional configuration for browser environment.
37
-
-`plugin:@mysticatea/+node` ... Additional configuration for Node.js environment.
38
-
-`plugin:@mysticatea/+eslint-plugin` ... Additional configuration for ESLint plugins. This includes `plugin:mysticatea/+node` setting.
39
-
40
-
#### Details
41
-
42
-
The main configurations `plugin:@mysticatea/es*` does:
43
-
44
-
- detect bug-like code by ESLint rules.
45
-
- enforce whitespace style by Prettier.
46
-
- handle the `.ts` files as TypeScript then check by `typescript-eslint-parser` and `eslint-plugin-typescript`.
47
-
- handle the `.vue` files as Vue.js SFC then check by `vue-eslint-parser` and `eslint-plugin-vue`.
48
-
- handle the files in `test`/`tests` directory as `mocha`'s test code.
49
-
- handle the files in `scripts` directory as Node.js environment.
50
-
- handle the `.eslintrc.js` file as a Node.js script.
51
-
- handle the `webpack.config.js` file as a Node.js script.
52
-
- handle the `rollup.config.js` file as an ES module.
53
-
54
-
You can use combination of a main configuration and some additional configurations.
55
-
For examples:
56
-
57
-
##### For Node.js
58
-
59
-
```json
60
-
{
61
-
"extends": [
62
-
"plugin:@mysticatea/es2015",
63
-
"plugin:@mysticatea/+node"
64
-
]
65
-
}
66
-
```
67
-
68
-
> It handles `.js` files as scripts and `.mjs` files as modules.
69
-
70
-
##### For Browsers
71
-
72
-
```json
73
-
{
74
-
"extends": [
75
-
"plugin:@mysticatea/es2015",
76
-
"plugin:@mysticatea/+browser"
77
-
]
78
-
}
79
-
```
80
-
81
-
##### For Browsers with ES modules
82
-
83
-
```json
84
-
{
85
-
"extends": [
86
-
"plugin:@mysticatea/es2015",
87
-
"plugin:@mysticatea/+modules",
88
-
"plugin:@mysticatea/+browser"
89
-
]
90
-
}
91
-
```
92
-
93
-
##### For ESLint plugins
94
-
95
-
```json
96
-
{
97
-
"extends": [
98
-
"plugin:@mysticatea/es2015",
99
-
"plugin:@mysticatea/+eslint-plugin"
100
-
]
101
-
}
102
-
```
28
+
-`plugin:@mysticatea/core/es5` ... Basic configuration for ES5.
103
29
104
30
### Rules
105
31
106
-
This plugin has some original rules and foreign rules.
107
-
108
-
#### Original rules
109
-
110
32
-[@mysticatea/arrow-parens](docs/rules/arrow-parens.md) enforces parens of argument lists (excludes too redundant parens) (fixable).
111
33
-[@mysticatea/block-scoped-var](docs/rules/block-scoped-var.md) handles variables which are declared by `var` declaration as block-scoped. It disallows redeclarations, uses from outside of the scope, shadowing.
112
34
-[@mysticatea/no-instanceof-array](docs/rules/no-instanceof-array.md) disallows 'instanceof' for Array (fixable).
@@ -117,25 +39,13 @@ This plugin has some original rules and foreign rules.
-[@mysticatea/prefer-for-of](docs/rules/prefer-for-of.md) requires `for-of` statements instead of `Array#forEach` or something like (fixable).
119
41
120
-
#### Foreign rules
121
-
122
-
- All `@mysticatea/eslint-comments/*` rules are imported from [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments).
123
-
- All `@mysticatea/eslint-plugin/*` rules are imported from [eslint-plugin-eslint-plugin](https://www.npmjs.com/package/eslint-plugin-eslint-plugin).
124
-
- All `@mysticatea/node/*` rules are imported from [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node).
125
-
- All `@mysticatea/ts/*` rules are imported from [eslint-plugin-typescript](https://www.npmjs.com/package/eslint-plugin-typescript).
126
-
- All `@mysticatea/vue/*` rules are imported from [eslint-plugin-vue](https://www.npmjs.com/package/eslint-plugin-vue).
127
-
- The `@mysticatea/prettier` rule is imported from [eslint-plugin-prettier](https://www.npmjs.com/package/eslint-plugin-prettier).
128
-
129
-
> **Q:** Why don't you use those plugins directly?<br>
130
-
> **A:** The combination with shareable configs and plugins has some problems because shareable configs were not designed to be used with plugins. @nzakas illustrated a way to use plugins as shareable configs together with other plugins in the discussion [eslint/eslint#3458](https://github.com/eslint/eslint/issues/3458#issuecomment-257161846). This is the way.
131
-
132
42
## 🚥 Semantic Versioning Policy
133
43
134
44
This plugin follows [semantic versioning](http://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
0 commit comments