chore: setup eslint
This commit is contained in:
parent
4f6f441b3b
commit
3ab877e869
3 changed files with 59 additions and 77 deletions
|
@ -1,53 +1,17 @@
|
|||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
// "eslint:recommended",
|
||||
// {
|
||||
// rules: {
|
||||
// semi: ["warn", "always"]
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// files: ["./src/*.js"],
|
||||
// rules: {
|
||||
// "semi": "error",
|
||||
// "no-unused-vars": "error"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// files: ["./site/***js"],
|
||||
// rules: {
|
||||
// "no-undef": "off",
|
||||
// "no-unused-vars": "off",
|
||||
// },
|
||||
// }
|
||||
]
|
||||
/*
|
||||
{
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
},
|
||||
extends: ["eslint:recommended"],
|
||||
overrides: [
|
||||
{
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
files: [".eslintrc.{js,cjs}"],
|
||||
parserOptions: {
|
||||
sourceType: "script",
|
||||
},
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
pluginJs.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
"no-unused-vars": "warn",
|
||||
"no-undef": "off",
|
||||
},
|
||||
{
|
||||
files: ["./site/***js"],
|
||||
rules: {
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
},
|
||||
};
|
||||
*/
|
||||
{
|
||||
ignores: ["site/*"],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
"@size-limit/preset-small-lib": "^11.1.6",
|
||||
"esbuild": "^0.24.0",
|
||||
"eslint": "^9.14.0",
|
||||
"globals": "^15.14.0",
|
||||
"husky": "^9.1.6",
|
||||
"prettier": "^3.3.3",
|
||||
"size-limit": "^11.1.6",
|
||||
|
|
|
@ -17,6 +17,9 @@ importers:
|
|||
eslint:
|
||||
specifier: ^9.14.0
|
||||
version: 9.14.0(jiti@2.4.0)
|
||||
globals:
|
||||
specifier: ^15.14.0
|
||||
version: 15.14.0
|
||||
husky:
|
||||
specifier: ^9.1.6
|
||||
version: 9.1.6
|
||||
|
@ -37,10 +40,10 @@ importers:
|
|||
dependencies:
|
||||
'@mcflyjs/cli':
|
||||
specifier: latest
|
||||
version: 0.0.24
|
||||
version: 0.0.26
|
||||
'@mcflyjs/config':
|
||||
specifier: latest
|
||||
version: 0.1.2
|
||||
version: 0.1.5
|
||||
'@mcflyjs/core':
|
||||
specifier: ^0.5.2
|
||||
version: 0.5.2
|
||||
|
@ -562,12 +565,12 @@ packages:
|
|||
resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
|
||||
hasBin: true
|
||||
|
||||
'@mcflyjs/cli@0.0.24':
|
||||
resolution: {integrity: sha512-3Pk8BJcjyjVdrnrsVqgMXa4/DJouOKPFQromfwDhNpJueYMo5R6Q6lG9xXudcQhqOJ1VQSog4Irugxce3xEZTw==}
|
||||
'@mcflyjs/cli@0.0.26':
|
||||
resolution: {integrity: sha512-agmJa4f3Jeb4KV/wTXqXBywMNlqsmZwXHB3HHAHz0vYuaziJ4S3s4Gn3q33XZnZv45kNB1oHlAX+HFJnXygrJA==}
|
||||
hasBin: true
|
||||
|
||||
'@mcflyjs/config@0.1.2':
|
||||
resolution: {integrity: sha512-V/yIJ320OYokmt1wWdXHELpNZ/GbzDuLkT2Wwcm6/UcrE1UEpKKY13RKgiXh4IRk59p4gRWi78wGvn/iPNGTzQ==}
|
||||
'@mcflyjs/config@0.1.5':
|
||||
resolution: {integrity: sha512-FtuQai5CP8cuYESfs3LPgaQ+5gN/dOTCqY9sYypsC0fL6W20a8Nf19yWryLoNodX/Ahjy09BzKL4PFc8EgPD9w==}
|
||||
|
||||
'@mcflyjs/core@0.5.2':
|
||||
resolution: {integrity: sha512-BSqmLN940455NS53BuOxTFj4jFvAPVIDnI9Q38yGrQeaUQ6Wj5aaSmo3HOgV2jaa0cI3GZ6Y1XYLve4jvV9RlA==}
|
||||
|
@ -1049,6 +1052,7 @@ packages:
|
|||
are-we-there-yet@2.0.0:
|
||||
resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==}
|
||||
engines: {node: '>=10'}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
argparse@2.0.1:
|
||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||
|
@ -1487,6 +1491,7 @@ packages:
|
|||
gauge@3.0.2:
|
||||
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
|
||||
engines: {node: '>=10'}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
get-caller-file@2.0.5:
|
||||
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
|
||||
|
@ -1513,15 +1518,21 @@ packages:
|
|||
|
||||
glob@7.2.3:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
|
||||
glob@8.1.0:
|
||||
resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
|
||||
engines: {node: '>=12'}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
|
||||
globals@14.0.0:
|
||||
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
globals@15.14.0:
|
||||
resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
globby@14.0.1:
|
||||
resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
@ -1598,6 +1609,7 @@ packages:
|
|||
|
||||
inflight@1.0.6:
|
||||
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
|
||||
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
|
||||
|
||||
inherits@2.0.4:
|
||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
|
@ -1913,6 +1925,7 @@ packages:
|
|||
|
||||
npmlog@5.0.1:
|
||||
resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
nypm@0.3.8:
|
||||
resolution: {integrity: sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==}
|
||||
|
@ -2118,6 +2131,7 @@ packages:
|
|||
|
||||
rimraf@3.0.2:
|
||||
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
|
||||
deprecated: Rimraf versions prior to v4 are no longer supported
|
||||
hasBin: true
|
||||
|
||||
rollup-plugin-visualizer@5.12.0:
|
||||
|
@ -2892,12 +2906,13 @@ snapshots:
|
|||
- encoding
|
||||
- supports-color
|
||||
|
||||
'@mcflyjs/cli@0.0.24':
|
||||
'@mcflyjs/cli@0.0.26':
|
||||
dependencies:
|
||||
'@mcflyjs/core': 0.5.3
|
||||
citty: 0.1.5
|
||||
consola: 3.2.3
|
||||
|
||||
'@mcflyjs/config@0.1.2':
|
||||
'@mcflyjs/config@0.1.5':
|
||||
dependencies:
|
||||
'@mcflyjs/core': 0.5.3
|
||||
web-component-base: 2.0.6
|
||||
|
@ -3368,7 +3383,7 @@ snapshots:
|
|||
giget: 1.2.1
|
||||
jiti: 1.21.0
|
||||
mlly: 1.6.1
|
||||
ohash: 1.1.3
|
||||
ohash: 1.1.4
|
||||
pathe: 1.1.2
|
||||
perfect-debounce: 1.0.0
|
||||
pkg-types: 1.0.3
|
||||
|
@ -3807,9 +3822,9 @@ snapshots:
|
|||
citty: 0.1.6
|
||||
consola: 3.2.3
|
||||
defu: 6.1.4
|
||||
node-fetch-native: 1.6.2
|
||||
node-fetch-native: 1.6.4
|
||||
nypm: 0.3.8
|
||||
ohash: 1.1.3
|
||||
ohash: 1.1.4
|
||||
pathe: 1.1.2
|
||||
tar: 6.2.0
|
||||
|
||||
|
@ -3840,6 +3855,8 @@ snapshots:
|
|||
|
||||
globals@14.0.0: {}
|
||||
|
||||
globals@15.14.0: {}
|
||||
|
||||
globby@14.0.1:
|
||||
dependencies:
|
||||
'@sindresorhus/merge-streams': 2.3.0
|
||||
|
@ -3857,16 +3874,16 @@ snapshots:
|
|||
|
||||
h3@1.11.1:
|
||||
dependencies:
|
||||
cookie-es: 1.0.0
|
||||
cookie-es: 1.2.2
|
||||
crossws: 0.2.4
|
||||
defu: 6.1.4
|
||||
destr: 2.0.3
|
||||
iron-webcrypto: 1.0.0
|
||||
ohash: 1.1.3
|
||||
radix3: 1.1.1
|
||||
ufo: 1.4.0
|
||||
iron-webcrypto: 1.2.1
|
||||
ohash: 1.1.4
|
||||
radix3: 1.1.2
|
||||
ufo: 1.5.4
|
||||
uncrypto: 0.1.3
|
||||
unenv: 1.9.0
|
||||
unenv: 1.10.0
|
||||
transitivePeerDependencies:
|
||||
- uWebSockets.js
|
||||
|
||||
|
@ -4070,14 +4087,14 @@ snapshots:
|
|||
crossws: 0.2.4
|
||||
defu: 6.1.4
|
||||
get-port-please: 3.1.2
|
||||
h3: 1.11.1
|
||||
h3: 1.13.0
|
||||
http-shutdown: 1.2.2
|
||||
jiti: 1.21.0
|
||||
mlly: 1.6.1
|
||||
node-forge: 1.3.1
|
||||
pathe: 1.1.2
|
||||
std-env: 3.7.0
|
||||
ufo: 1.4.0
|
||||
ufo: 1.5.4
|
||||
untun: 0.1.3
|
||||
uqr: 0.1.2
|
||||
transitivePeerDependencies:
|
||||
|
@ -4161,7 +4178,7 @@ snapshots:
|
|||
acorn: 8.11.3
|
||||
pathe: 1.1.2
|
||||
pkg-types: 1.0.3
|
||||
ufo: 1.4.0
|
||||
ufo: 1.5.4
|
||||
|
||||
mri@1.2.0: {}
|
||||
|
||||
|
@ -4301,15 +4318,15 @@ snapshots:
|
|||
consola: 3.2.3
|
||||
execa: 8.0.1
|
||||
pathe: 1.1.2
|
||||
ufo: 1.4.0
|
||||
ufo: 1.5.4
|
||||
|
||||
object-assign@4.1.1: {}
|
||||
|
||||
ofetch@1.3.3:
|
||||
dependencies:
|
||||
destr: 2.0.3
|
||||
node-fetch-native: 1.6.2
|
||||
ufo: 1.4.0
|
||||
node-fetch-native: 1.6.4
|
||||
ufo: 1.5.4
|
||||
|
||||
ohash@1.1.3: {}
|
||||
|
||||
|
@ -4781,7 +4798,7 @@ snapshots:
|
|||
consola: 3.2.3
|
||||
defu: 6.1.4
|
||||
mime: 3.0.0
|
||||
node-fetch-native: 1.6.2
|
||||
node-fetch-native: 1.6.4
|
||||
pathe: 1.1.2
|
||||
|
||||
unicorn-magic@0.1.0: {}
|
||||
|
@ -4818,14 +4835,14 @@ snapshots:
|
|||
anymatch: 3.1.3
|
||||
chokidar: 3.6.0
|
||||
destr: 2.0.3
|
||||
h3: 1.11.1
|
||||
h3: 1.13.0
|
||||
ioredis: 5.3.2
|
||||
listhen: 1.7.2
|
||||
lru-cache: 10.1.0
|
||||
mri: 1.2.0
|
||||
node-fetch-native: 1.6.2
|
||||
node-fetch-native: 1.6.4
|
||||
ofetch: 1.3.3
|
||||
ufo: 1.4.0
|
||||
ufo: 1.5.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- uWebSockets.js
|
||||
|
|
Loading…
Reference in a new issue