@dword-design/eslint-config 5.0.1 → 5.0.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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/dist/create/index.js +17 -5
- package/package.json +3 -1
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -102,5 +102,5 @@ Thanks a lot for your support! ❤️
|
|
|
102
102
|
|
|
103
103
|
## License
|
|
104
104
|
|
|
105
|
-
[MIT License](https://opensource.org/
|
|
105
|
+
[MIT License](https://opensource.org/license/mit/) © [Sebastian Landwehr](https://sebastianlandwehr.com)
|
|
106
106
|
<!-- /LICENSE -->
|
package/dist/create/index.js
CHANGED
|
@@ -3,8 +3,10 @@ import filter from "@dword-design/functions/dist/filter.js";
|
|
|
3
3
|
import join from "@dword-design/functions/dist/join.js";
|
|
4
4
|
import map from "@dword-design/functions/dist/map.js";
|
|
5
5
|
import omit from "@dword-design/functions/dist/omit.js";
|
|
6
|
+
import confusingBrowserGlobals from 'confusing-browser-globals';
|
|
6
7
|
import packageName from 'depcheck-package-name';
|
|
7
8
|
import loadPkg from 'load-pkg';
|
|
9
|
+
import { without } from 'lodash-es';
|
|
8
10
|
import { createRequire } from 'module';
|
|
9
11
|
import restrictedImports from "./restricted-imports.js";
|
|
10
12
|
const _require = createRequire(import.meta.url);
|
|
@@ -19,12 +21,11 @@ export default (() => {
|
|
|
19
21
|
};
|
|
20
22
|
})(_ref));
|
|
21
23
|
return {
|
|
22
|
-
env: {
|
|
23
|
-
browser: true,
|
|
24
|
-
es6: true,
|
|
25
|
-
node: true
|
|
26
|
-
},
|
|
27
24
|
extends: [packageName`eslint-config-airbnb-base`, `plugin:${packageName`eslint-plugin-promise`}/recommended`, `plugin:${packageName`eslint-plugin-import`}/recommended`, `plugin:${packageName`@dword-design/eslint-plugin-import-alias`}/recommended`, `plugin:${packageName`eslint-plugin-vue`}/vue3-recommended`, `plugin:${packageName`eslint-plugin-prettier`}/recommended`],
|
|
25
|
+
globals: {
|
|
26
|
+
self: true,
|
|
27
|
+
window: true
|
|
28
|
+
},
|
|
28
29
|
overrides: [{
|
|
29
30
|
files: '**/*.spec.js',
|
|
30
31
|
globals: {
|
|
@@ -77,6 +78,17 @@ export default (() => {
|
|
|
77
78
|
'no-param-reassign': 'off',
|
|
78
79
|
'no-promise-executor-return': 'off',
|
|
79
80
|
'no-regex-spaces': 'off',
|
|
81
|
+
// https://github.com/facebook/create-react-app/issues/12847
|
|
82
|
+
'no-restricted-globals': ['error', {
|
|
83
|
+
message: 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
|
|
84
|
+
name: 'isFinite'
|
|
85
|
+
}, {
|
|
86
|
+
message: 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
|
87
|
+
name: 'isNaN'
|
|
88
|
+
}, ...without(confusingBrowserGlobals, 'self').map(g => ({
|
|
89
|
+
message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
|
|
90
|
+
name: g
|
|
91
|
+
}))],
|
|
80
92
|
'no-restricted-imports': ['error', {
|
|
81
93
|
paths: eslintRestrictedImports
|
|
82
94
|
}],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/eslint-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"repository": "dword-design/eslint-config",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@dword-design/babel-config": "^3.0.0",
|
|
26
26
|
"@dword-design/eslint-plugin-import-alias": "^4.0.8",
|
|
27
27
|
"@dword-design/functions": "^5.0.22",
|
|
28
|
+
"confusing-browser-globals": "^1.0.11",
|
|
28
29
|
"depcheck-package-name": "^3.0.0",
|
|
29
30
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
30
31
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"eslint-plugin-vue": "^9.10.0",
|
|
43
44
|
"jiti": "^1.18.2",
|
|
44
45
|
"load-pkg": "^4.0.0",
|
|
46
|
+
"lodash-es": "^4.17.21",
|
|
45
47
|
"prettier": "^3.2.4",
|
|
46
48
|
"vue-eslint-parser": "^9.1.1"
|
|
47
49
|
},
|