Skip to content

Commit

Permalink
chore: update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Dec 28, 2024
1 parent 755aad7 commit 457cb0b
Show file tree
Hide file tree
Showing 13 changed files with 1,614 additions and 3,553 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lint-staged
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@
"dist": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
"go.goroot": "/home/gerald/.local/share/mise/installs/go/1.23.4",
"debug.javascript.defaultRuntimeExecutable": {
"pwa-node": "/home/gerald/.local/share/mise/shims/node"
},
"go.alternateTools": {
"go": "/home/gerald/.local/share/mise/shims/go",
"dlv": "/home/gerald/.local/share/mise/shims/dlv"
}
}
5 changes: 2 additions & 3 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ pnpm-lock.yaml
rollup.conf.mjs
src/**
tsconfig.json
.babelrc.js
babel.config.cjs
eslint.config.mjs
.browserslistrc
.editorconfig
.eslintignore
.eslintrc.js
.github/**
.gitignore
.husky/**
Expand Down
2 changes: 1 addition & 1 deletion babel.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: require.resolve('@gera2ld/plaid/config/babelrc-base'),
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
],
};
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
import ts from 'typescript-eslint';

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{ ignores: ['**/*.js', '**/dist/'] },
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
];
34 changes: 28 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@
},
"scripts": {
"prepare": "husky",
"vscode:prepublish": "run-s build",
"vscode:prepublish": "pnpm build",
"clean": "del-cli dist",
"build:js": "rollup -c && node dist/postbuild.js",
"build": "run-s lint clean build:js",
"lint": "eslint --ext .ts,.tsx ."
"build": "pnpm lint && pnpm clean && pnpm build:js",
"lint": "eslint"
},
"repository": "https://github.com/gera2ld/markmap-vscode",
"main": "dist/extension.js",
Expand All @@ -116,22 +116,44 @@
"dist"
],
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/plugin-transform-runtime": "^7.23.4",
"@babel/preset-env": "^7.23.5",
"@babel/preset-typescript": "^7.23.3",
"@babel/runtime": "^7.22.6",
"@gera2ld/plaid": "~2.7.0",
"@gera2ld/plaid-rollup": "~2.7.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@types/lodash.debounce": "^4.0.7",
"@types/node": "^20.4.2",
"@types/vscode": "~1.75.0",
"@types/vscode-webview": "^1.57.5",
"del-cli": "^6.0.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.14.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"lodash.debounce": "^4.0.8",
"markmap-common": "0.18.4",
"markmap-lib": "0.18.4",
"markmap-render": "0.18.4",
"markmap-toolbar": "0.18.4",
"markmap-view": "0.18.4",
"read-package-up": "^11.0.0",
"rollup": "^4.6.1",
"rollup-plugin-postcss": "^4.0.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.2",
"vscode-uri": "^3.0.7"
},
"lint-staged": {
"*.ts": [
"eslint --fix"
]
}
}
}
Loading

0 comments on commit 457cb0b

Please sign in to comment.