Skip to content

Commit 457cb0b

Browse files
committed
chore: update lint
1 parent 755aad7 commit 457cb0b

File tree

13 files changed

+1614
-3553
lines changed

13 files changed

+1614
-3553
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

.husky/pre-push

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npm run lint

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@
77
"dist": true // set this to false to include "out" folder in search results
88
},
99
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10-
"typescript.tsc.autoDetect": "off"
10+
"typescript.tsc.autoDetect": "off",
11+
"go.goroot": "/home/gerald/.local/share/mise/installs/go/1.23.4",
12+
"debug.javascript.defaultRuntimeExecutable": {
13+
"pwa-node": "/home/gerald/.local/share/mise/shims/node"
14+
},
15+
"go.alternateTools": {
16+
"go": "/home/gerald/.local/share/mise/shims/go",
17+
"dlv": "/home/gerald/.local/share/mise/shims/dlv"
18+
}
1119
}

.vscodeignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ pnpm-lock.yaml
55
rollup.conf.mjs
66
src/**
77
tsconfig.json
8-
.babelrc.js
8+
babel.config.cjs
9+
eslint.config.mjs
910
.browserslistrc
1011
.editorconfig
11-
.eslintignore
12-
.eslintrc.js
1312
.github/**
1413
.gitignore
1514
.husky/**

babel.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
extends: require.resolve('@gera2ld/plaid/config/babelrc-base'),
32
presets: [
3+
'@babel/preset-env',
44
'@babel/preset-typescript',
55
],
66
};

eslint.config.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import js from '@eslint/js';
2+
import prettier from 'eslint-config-prettier';
3+
import globals from 'globals';
4+
import ts from 'typescript-eslint';
5+
6+
/** @type {import('eslint').Linter.Config[]} */
7+
export default [
8+
js.configs.recommended,
9+
...ts.configs.recommended,
10+
prettier,
11+
{
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
},
17+
},
18+
},
19+
{ ignores: ['**/*.js', '**/dist/'] },
20+
{
21+
rules: {
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
},
24+
},
25+
];

package.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@
103103
},
104104
"scripts": {
105105
"prepare": "husky",
106-
"vscode:prepublish": "run-s build",
106+
"vscode:prepublish": "pnpm build",
107107
"clean": "del-cli dist",
108108
"build:js": "rollup -c && node dist/postbuild.js",
109-
"build": "run-s lint clean build:js",
110-
"lint": "eslint --ext .ts,.tsx ."
109+
"build": "pnpm lint && pnpm clean && pnpm build:js",
110+
"lint": "eslint"
111111
},
112112
"repository": "https://github.com/gera2ld/markmap-vscode",
113113
"main": "dist/extension.js",
@@ -116,22 +116,44 @@
116116
"dist"
117117
],
118118
"devDependencies": {
119+
"@babel/core": "^7.23.5",
120+
"@babel/plugin-transform-runtime": "^7.23.4",
121+
"@babel/preset-env": "^7.23.5",
122+
"@babel/preset-typescript": "^7.23.3",
119123
"@babel/runtime": "^7.22.6",
120-
"@gera2ld/plaid": "~2.7.0",
121-
"@gera2ld/plaid-rollup": "~2.7.0",
124+
"@rollup/plugin-babel": "^6.0.4",
125+
"@rollup/plugin-commonjs": "^25.0.7",
126+
"@rollup/plugin-json": "^6.0.1",
127+
"@rollup/plugin-node-resolve": "^15.2.3",
128+
"@rollup/plugin-replace": "^5.0.5",
129+
"@rollup/plugin-terser": "^0.4.4",
122130
"@types/lodash.debounce": "^4.0.7",
123131
"@types/node": "^20.4.2",
124132
"@types/vscode": "~1.75.0",
125133
"@types/vscode-webview": "^1.57.5",
126134
"del-cli": "^6.0.0",
135+
"eslint": "^9.17.0",
136+
"eslint-config-prettier": "^9.1.0",
137+
"eslint-plugin-prettier": "^5.2.1",
138+
"globals": "^15.14.0",
127139
"husky": "^9.1.7",
140+
"lint-staged": "^15.3.0",
128141
"lodash.debounce": "^4.0.8",
129142
"markmap-common": "0.18.4",
130143
"markmap-lib": "0.18.4",
131144
"markmap-render": "0.18.4",
132145
"markmap-toolbar": "0.18.4",
133146
"markmap-view": "0.18.4",
134147
"read-package-up": "^11.0.0",
148+
"rollup": "^4.6.1",
149+
"rollup-plugin-postcss": "^4.0.2",
150+
"typescript": "^5.7.2",
151+
"typescript-eslint": "^8.18.2",
135152
"vscode-uri": "^3.0.7"
153+
},
154+
"lint-staged": {
155+
"*.ts": [
156+
"eslint --fix"
157+
]
136158
}
137-
}
159+
}

0 commit comments

Comments
 (0)