Added eslint
This commit is contained in:
parent
6e495de6dd
commit
fcce4fd81e
3 changed files with 53 additions and 1 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
43
eslint.config.js
Normal file
43
eslint.config.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import js from "@eslint/js";
|
||||
import ts from 'typescript-eslint';
|
||||
import tsEslintParser from "@typescript-eslint/parser";
|
||||
import tsEslint from "@typescript-eslint/eslint-plugin";
|
||||
import globals from "globals";
|
||||
|
||||
export default ts.config(
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parser: tsEslintParser,
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2020
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.es2021,
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
tseslint: tsEslint,
|
||||
},
|
||||
ignores: [
|
||||
".DS_Store",
|
||||
"node_modules",
|
||||
"/dist",
|
||||
"/cmd",
|
||||
"/utils",
|
||||
"/package",
|
||||
"/build",
|
||||
".env",
|
||||
".env.*",
|
||||
"!.env.example",
|
||||
"pnpm-lock.yaml",
|
||||
"package-lock.json",
|
||||
"yarn.lock",
|
||||
"bun.lockb",
|
||||
],
|
||||
}
|
||||
);
|
11
package.json
11
package.json
|
@ -2,13 +2,20 @@
|
|||
"name": "shadow",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "bun run vite build --watch"
|
||||
"dev": "bun run vite build --watch",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
"@typescript-eslint/parser": "^7.7.1",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"daisyui": "^4.10.2",
|
||||
"eslint": "^9.1.1",
|
||||
"glob": "^10.3.12",
|
||||
"globals": "^15.0.0",
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"ts-node": "^10.9.2",
|
||||
|
@ -18,7 +25,9 @@
|
|||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@eslint/js": "^9.1.1",
|
||||
"sharp": "^0.33.3",
|
||||
"typescript-eslint": "^7.7.1",
|
||||
"vite-plugin-image-optimizer": "^1.1.7",
|
||||
"vitest": "^1.5.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue