mirror of
https://github.com/gavvvr/obsidian-timecodes-plugin.git
synced 2026-07-22 05:38:08 +00:00
chore(eslint): configure ESLint for TS and JS
This commit is contained in:
parent
5622433365
commit
caba792ff4
3 changed files with 41 additions and 2 deletions
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"editorconfig.editorconfig",
|
||||
"dbaeumer.vscode-eslint",
|
||||
]
|
||||
}
|
||||
|
|
|
|||
33
eslint.config.js
Normal file
33
eslint.config.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// @ts-check
|
||||
|
||||
import eslint from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.strictTypeChecked,
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
extends: [
|
||||
tseslint.configs.disableTypeChecked,
|
||||
],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: { ...globals.node },
|
||||
sourceType: 'module',
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['out/*'],
|
||||
},
|
||||
)
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "node scripts/dev.js",
|
||||
"build": "tsc -noEmit -skipLibCheck && node scripts/esbuild.build.js production"
|
||||
"build": "tsc -noEmit -skipLibCheck && node scripts/esbuild.build.js production",
|
||||
"test:eslint": "eslint --cache --cache-location out/.eslintcache"
|
||||
},
|
||||
"keywords": [
|
||||
"obsidian.md",
|
||||
|
|
@ -14,12 +15,16 @@
|
|||
"author": "Kirill Gavrilov",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.18.0",
|
||||
"@types/node": "22.10.7",
|
||||
"enquirer": "2.4.1",
|
||||
"esbuild": "0.24.2",
|
||||
"eslint": "9.18.0",
|
||||
"globals": "15.14.0",
|
||||
"obsidian": "1.7.2",
|
||||
"obsidian-utils": "0.10.2",
|
||||
"typescript": "5.7.3"
|
||||
"typescript": "5.7.3",
|
||||
"typescript-eslint": "8.21.0"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.4"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue