Update
This commit is contained in:
parent
003a43512c
commit
c175f87441
@ -4,6 +4,8 @@ Personal ESLint config. Guaranteed to have no useless polyfills.
|
||||
|
||||
## flat config support
|
||||
|
||||
- ❌ [import](https://github.com/import-js/eslint-plugin-import/issues/2556)
|
||||
- ✅ [react](https://github.com/jsx-eslint/eslint-plugin-react/pull/3429)
|
||||
- ⏱️ [a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/891)
|
||||
- ✅ [react](https://github.com/jsx-eslint/eslint-plugin-react/pull/3429)
|
||||
- ✅ [unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn/pull/1886)
|
||||
- ❌ [import](https://github.com/import-js/eslint-plugin-import/issues/2556)
|
||||
- ❌ [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/978)
|
||||
|
14
dist/package.json
vendored
14
dist/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aet/eslint-rules",
|
||||
"version": "0.0.24-beta.3",
|
||||
"version": "0.0.26",
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
@ -8,11 +8,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/eslint": "^8.56.9",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||
"@typescript-eslint/parser": "^7.7.0",
|
||||
"@typescript-eslint/type-utils": "^7.7.0",
|
||||
"@typescript-eslint/utils": "^7.7.0",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"@typescript-eslint/type-utils": "^7.8.0",
|
||||
"@typescript-eslint/utils": "^7.8.0",
|
||||
"aria-query": "^5.3.0",
|
||||
"axe-core": "^4.9.0",
|
||||
"axobject-query": "^4.0.0",
|
||||
@ -34,7 +34,7 @@
|
||||
"fast-glob": "^3.3.2",
|
||||
"get-tsconfig": "^4.7.3",
|
||||
"ignore": "^5.3.1",
|
||||
"is-builtin-module": "^3.2.1",
|
||||
"is-builtin-module": "^4.0.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"language-tags": "^1.0.9",
|
||||
"lodash": "^4.17.21",
|
||||
|
24
package.json
24
package.json
@ -6,25 +6,25 @@
|
||||
},
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.24.4",
|
||||
"@babel/core": "^7.24.5",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.24.1",
|
||||
"@babel/preset-env": "^7.24.4",
|
||||
"@babel/preset-env": "^7.24.5",
|
||||
"@types/babel-plugin-macros": "^3.1.3",
|
||||
"@types/babel__core": "^7.20.5",
|
||||
"@types/eslint": "^8.56.9",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@types/esprima": "^4.0.6",
|
||||
"@types/esquery": "^1.5.3",
|
||||
"@types/estree": "^1.0.5",
|
||||
"@types/estree-jsx": "^1.0.5",
|
||||
"@types/lodash": "^4.17.0",
|
||||
"@types/node": "^20.12.7",
|
||||
"@typescript-eslint/eslint-plugin": "7.7.0",
|
||||
"@typescript-eslint/type-utils": "^7.7.0",
|
||||
"@typescript-eslint/types": "^7.7.0",
|
||||
"@typescript-eslint/typescript-estree": "^7.7.0",
|
||||
"@typescript-eslint/utils": "^7.7.0",
|
||||
"@types/lodash": "^4.17.1",
|
||||
"@types/node": "^20.12.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/type-utils": "^7.8.0",
|
||||
"@typescript-eslint/types": "^7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "^7.8.0",
|
||||
"@typescript-eslint/utils": "^7.8.0",
|
||||
"babel-plugin-macros": "^3.1.0",
|
||||
"dts-bundle-generator": "^9.4.0",
|
||||
"dts-bundle-generator": "9.4.0",
|
||||
"esbin": "0.0.4",
|
||||
"esbuild": "0.20.2",
|
||||
"esbuild-plugin-alias": "^0.2.1",
|
||||
@ -35,7 +35,7 @@
|
||||
"esquery": "^1.5.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"find-cache-dir": "^5.0.0",
|
||||
"json-schema-to-ts": "^3.0.1",
|
||||
"json-schema-to-ts": "^3.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"minimatch": "^9.0.4",
|
||||
"patch-package": "^8.0.0",
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git a/package.json b/package.json
|
||||
index 98370b5..da6cd9b 100644
|
||||
index d00b065..fc63b32 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -62,8 +62,7 @@
|
||||
|
4468
pnpm-lock.yaml
generated
4468
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,15 @@
|
||||
{
|
||||
"eslint-plugin-import": {
|
||||
"hash": "f77ceb679d59ced5d9a633123385470a9eea10d9",
|
||||
"date": "2024-04-07T12:55:28+12:00",
|
||||
"hash": "c0ac54b8a721c2b1c9048838acc4d6282f4fe7a7",
|
||||
"date": "2024-04-25T10:57:27-07:00",
|
||||
"committer": "Jordan Harband",
|
||||
"subject": "[actions] cancel in-progress runs on PR updates"
|
||||
"subject": "[Dev Deps] pin `find-babel-config` to v1.2.0, due to a breaking change in v1.2.1"
|
||||
},
|
||||
"eslint-import-resolver-typescript": {
|
||||
"hash": "7a02ac08b5aaac8c217f0e87142f97eafcc38fbc",
|
||||
"date": "2024-04-01T01:06:20+00:00",
|
||||
"hash": "5c4f28a97d268a9b74fe8a9e5ab965f43cc7524e",
|
||||
"date": "2024-05-01T01:20:42+00:00",
|
||||
"committer": "GitHub",
|
||||
"subject": "chore(deps): update dependency npm-run-all2 to ^5.0.2 (#277)"
|
||||
"subject": "fix(deps): update dependency get-tsconfig to ^4.7.3 (#280)"
|
||||
},
|
||||
"eslint-plugin-jsx-a11y": {
|
||||
"hash": "0d5321a5457c5f0da0ca216053cc5b4f571b53ae",
|
||||
@ -18,16 +18,16 @@
|
||||
"subject": "[Deps] update `@babel/runtime`, `safe-regex-test`"
|
||||
},
|
||||
"eslint-plugin-n": {
|
||||
"hash": "8d711f5446655c9874aeffb2ef28b3c4d8463fb6",
|
||||
"date": "2024-04-16T16:08:04+08:00",
|
||||
"hash": "ecdf019c54c5bd720c20d2ea21886559c15f3205",
|
||||
"date": "2024-04-30T17:47:30+08:00",
|
||||
"committer": "GitHub",
|
||||
"subject": "chore: update outdated funding (#246)"
|
||||
"subject": "fix: remove invalid es-builtins (#258)"
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"hash": "4467db503e38b9356517cf6926d11be544ccf4b1",
|
||||
"date": "2024-03-16T12:54:58+09:00",
|
||||
"hash": "03cd4b578931714e8a3b70bf49998d97a6c6d811",
|
||||
"date": "2024-04-28T11:18:14-07:00",
|
||||
"committer": "Jordan Harband",
|
||||
"subject": "[Fix] `boolean-prop-naming`: avoid a crash with a non-TSTypeReference type"
|
||||
"subject": "Merge tag 'v7.34.1' into HEAD"
|
||||
},
|
||||
"jsx-ast-utils": {
|
||||
"hash": "5943318eaf23764eec3ff397ebb969613d728a95",
|
||||
|
164
src/presets/_restrictedGlobals.json
Normal file
164
src/presets/_restrictedGlobals.json
Normal file
@ -0,0 +1,164 @@
|
||||
[
|
||||
"addEventListener",
|
||||
"blur",
|
||||
"caches",
|
||||
"captureEvents",
|
||||
"clientInformation",
|
||||
"close",
|
||||
"closed",
|
||||
"crossOriginIsolated",
|
||||
"devicePixelRatio",
|
||||
"dispatchEvent",
|
||||
"event",
|
||||
"external",
|
||||
"focus",
|
||||
"innerHeight",
|
||||
"innerWidth",
|
||||
"length",
|
||||
"locationbar",
|
||||
"menubar",
|
||||
"name",
|
||||
"onabort",
|
||||
"onafterprint",
|
||||
"onanimationcancel",
|
||||
"onanimationend",
|
||||
"onanimationiteration",
|
||||
"onanimationstart",
|
||||
"onauxclick",
|
||||
"onbeforeinput",
|
||||
"onbeforeprint",
|
||||
"onbeforetoggle",
|
||||
"onbeforeunload",
|
||||
"onblur",
|
||||
"oncancel",
|
||||
"oncanplay",
|
||||
"oncanplaythrough",
|
||||
"onchange",
|
||||
"onclick",
|
||||
"onclose",
|
||||
"oncontextmenu",
|
||||
"oncopy",
|
||||
"oncuechange",
|
||||
"oncut",
|
||||
"ondblclick",
|
||||
"ondevicemotion",
|
||||
"ondeviceorientation",
|
||||
"ondeviceorientationabsolute",
|
||||
"ondrag",
|
||||
"ondragend",
|
||||
"ondragenter",
|
||||
"ondragleave",
|
||||
"ondragover",
|
||||
"ondragstart",
|
||||
"ondrop",
|
||||
"ondurationchange",
|
||||
"onemptied",
|
||||
"onended",
|
||||
"onerror",
|
||||
"onfocus",
|
||||
"onformdata",
|
||||
"ongamepadconnected",
|
||||
"ongamepaddisconnected",
|
||||
"ongotpointercapture",
|
||||
"onhashchange",
|
||||
"oninput",
|
||||
"oninvalid",
|
||||
"onkeydown",
|
||||
"onkeypress",
|
||||
"onkeyup",
|
||||
"onlanguagechange",
|
||||
"onload",
|
||||
"onloadeddata",
|
||||
"onloadedmetadata",
|
||||
"onloadstart",
|
||||
"onlostpointercapture",
|
||||
"onmessage",
|
||||
"onmessageerror",
|
||||
"onmousedown",
|
||||
"onmouseenter",
|
||||
"onmouseleave",
|
||||
"onmousemove",
|
||||
"onmouseout",
|
||||
"onmouseover",
|
||||
"onmouseup",
|
||||
"onoffline",
|
||||
"ononline",
|
||||
"onorientationchange",
|
||||
"onpagehide",
|
||||
"onpageshow",
|
||||
"onpaste",
|
||||
"onpause",
|
||||
"onplay",
|
||||
"onplaying",
|
||||
"onpointercancel",
|
||||
"onpointerdown",
|
||||
"onpointerenter",
|
||||
"onpointerleave",
|
||||
"onpointermove",
|
||||
"onpointerout",
|
||||
"onpointerover",
|
||||
"onpointerup",
|
||||
"onpopstate",
|
||||
"onprogress",
|
||||
"onratechange",
|
||||
"onrejectionhandled",
|
||||
"onreset",
|
||||
"onresize",
|
||||
"onscroll",
|
||||
"onscrollend",
|
||||
"onsecuritypolicyviolation",
|
||||
"onseeked",
|
||||
"onseeking",
|
||||
"onselect",
|
||||
"onselectionchange",
|
||||
"onselectstart",
|
||||
"onslotchange",
|
||||
"onstalled",
|
||||
"onstorage",
|
||||
"onsubmit",
|
||||
"onsuspend",
|
||||
"ontimeupdate",
|
||||
"ontoggle",
|
||||
"ontouchcancel",
|
||||
"ontouchend",
|
||||
"ontouchmove",
|
||||
"ontouchstart",
|
||||
"ontransitioncancel",
|
||||
"ontransitionend",
|
||||
"ontransitionrun",
|
||||
"ontransitionstart",
|
||||
"onunhandledrejection",
|
||||
"onunload",
|
||||
"onvolumechange",
|
||||
"onwaiting",
|
||||
"onwebkitanimationend",
|
||||
"onwebkitanimationiteration",
|
||||
"onwebkitanimationstart",
|
||||
"onwebkittransitionend",
|
||||
"onwheel",
|
||||
"orientation",
|
||||
"origin",
|
||||
"outerHeight",
|
||||
"outerWidth",
|
||||
"pageXOffset",
|
||||
"pageYOffset",
|
||||
"personalbar",
|
||||
"releaseEvents",
|
||||
"removeEventListener",
|
||||
"reportError",
|
||||
"screenLeft",
|
||||
"screenTop",
|
||||
"screenX",
|
||||
"screenY",
|
||||
"scroll",
|
||||
"scrollbars",
|
||||
"scrollBy",
|
||||
"scrollTo",
|
||||
"scrollX",
|
||||
"scrollY",
|
||||
"status",
|
||||
"statusbar",
|
||||
"stop",
|
||||
"toolbar",
|
||||
"top"
|
||||
]
|
@ -1,5 +1,6 @@
|
||||
import { error, warn, off } from '../constants';
|
||||
import { EslintRules } from 'eslint-define-config/src/rules/eslint';
|
||||
import restrictedGlobals from './_restrictedGlobals.json';
|
||||
|
||||
export const eslintRules: Partial<EslintRules> = {
|
||||
'arrow-body-style': [error, 'as-needed'],
|
||||
@ -14,7 +15,7 @@ export const eslintRules: Partial<EslintRules> = {
|
||||
'no-empty': [error, { allowEmptyCatch: true }],
|
||||
'no-inner-declarations': off,
|
||||
'no-lonely-if': error,
|
||||
'no-restricted-globals': [error, 'event', 'name', 'length'],
|
||||
'no-restricted-globals': [error, ...restrictedGlobals],
|
||||
'no-restricted-imports': [
|
||||
error,
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user