mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 08:04:45 -04:00
deps: update eslint to v9
This commit is contained in:
parent
7faa4ff99a
commit
a8b87d5f63
14 changed files with 732 additions and 384 deletions
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"./tsconfig.test.json"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"prettier"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": ["error",
|
||||
require('./.prettierrc.json')
|
||||
],
|
||||
}
|
||||
}
|
52
html-to-react/eslint.config.mjs
Normal file
52
html-to-react/eslint.config.mjs
Normal file
|
@ -0,0 +1,52 @@
|
|||
import { defineConfig } from 'eslint/config'
|
||||
import typescriptEslint from '@typescript-eslint/eslint-plugin'
|
||||
import prettier from 'eslint-plugin-prettier'
|
||||
import tsParser from '@typescript-eslint/parser'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import js from '@eslint/js'
|
||||
import { FlatCompat } from '@eslint/eslintrc'
|
||||
import prettierConfig from './.prettierrc.json' with { type: 'json' }
|
||||
import vitest from '@vitest/eslint-plugin'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
})
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
extends: compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier'
|
||||
),
|
||||
|
||||
plugins: {
|
||||
'@typescript-eslint': typescriptEslint,
|
||||
prettier,
|
||||
vitest
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
ecmaVersion: 5,
|
||||
sourceType: 'script',
|
||||
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.test.json']
|
||||
}
|
||||
},
|
||||
|
||||
rules: {
|
||||
'prettier/prettier': ['error', prettierConfig],
|
||||
|
||||
...vitest.configs.recommended.rules
|
||||
}
|
||||
}
|
||||
])
|
|
@ -50,15 +50,15 @@
|
|||
"devDependencies": {
|
||||
"@types/react": "18.3.11",
|
||||
"@types/react-dom": "18.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.14.0",
|
||||
"@typescript-eslint/parser": "8.14.0",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-prettier": "5.2.3",
|
||||
"@vitest/eslint-plugin": "1.1.43",
|
||||
"eslint": "9.25.1",
|
||||
"eslint-config-prettier": "10.1.2",
|
||||
"eslint-plugin-prettier": "5.2.6",
|
||||
"prettier": "3.3.3",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"typescript": "5.6.3",
|
||||
"typescript-eslint": "8.31.0",
|
||||
"vitest": "3.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue