mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Update ESLint configuration and dependency versions
This commit is contained in:
Generated
+21
-5
@@ -35,7 +35,7 @@
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@eslint/compat": "^1.2.2",
|
||||
"@eslint/compat": "^1.4.1",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.13.0",
|
||||
"dotenv": "^16.4.5",
|
||||
@@ -2295,16 +2295,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/compat": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.2.tgz",
|
||||
"integrity": "sha512-jhgiIrsw+tRfcBQ4BFl2C3vCrIUw2trCY0cnDvGZpwTtKCEDmZhAtMfrEUP/KpnwM6PrO0T+Ltm+ccW74olG3Q==",
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
|
||||
"integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.17.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^9.10.0"
|
||||
"eslint": "^8.40 || 9"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint": {
|
||||
@@ -2312,6 +2315,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/compat/node_modules/@eslint/core": {
|
||||
"version": "0.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
|
||||
"integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@eslint/compat": "^1.2.2",
|
||||
"@eslint/compat": "^1.4.1",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.13.0",
|
||||
"dotenv": "^16.4.5",
|
||||
|
||||
+20
-38
@@ -1,49 +1,31 @@
|
||||
import globals from 'globals'
|
||||
import cypressPlugin from 'eslint-plugin-cypress/flat'
|
||||
import prettierPlugin from 'eslint-plugin-prettier/recommended'
|
||||
import mochaPlugin from 'eslint-plugin-mocha'
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
import pluginReact from "eslint-plugin-react";
|
||||
import cypressPlugin from "eslint-plugin-cypress/flat";
|
||||
import { defineConfig } from "eslint/config";
|
||||
|
||||
// NOTE: This config is only used for running ESLint on the Cypress tests. Frontend and backend use their own configs.
|
||||
const cypressRecommended = cypressPlugin.configs.recommended;
|
||||
|
||||
const mochaRecommended = mochaPlugin.configs.flat.recommended
|
||||
const cypressRecommended = cypressPlugin.configs.recommended
|
||||
const mochaLanguageOptions = mochaRecommended.languageOptions ?? {}
|
||||
const cypressLanguageOptions = cypressRecommended.languageOptions ?? {}
|
||||
const mochaRules = mochaRecommended.rules ?? {}
|
||||
const cypressRules = cypressRecommended.rules ?? {}
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['cypress/**/*.{cy,spec}.{js,ts,tsx}'],
|
||||
...mochaRecommended,
|
||||
...cypressRecommended,
|
||||
rules: {
|
||||
...mochaRules,
|
||||
...cypressRules,
|
||||
'mocha/no-mocha-arrows': 'off',
|
||||
'mocha/no-skipped-tests': 'off',
|
||||
'mocha/max-top-level-suites': 'off',
|
||||
'mocha/no-top-level-hooks': 'off',
|
||||
'mocha/no-sibling-hooks': 'off',
|
||||
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
||||
plugins: { js },
|
||||
extends: ["js/recommended"],
|
||||
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
||||
},
|
||||
tseslint.configs.recommended,
|
||||
pluginReact.configs.flat.recommended,
|
||||
{
|
||||
...cypressRecommended,
|
||||
files: ["cypress/**/*.{cy,spec}.{js,ts,tsx}"],
|
||||
languageOptions: {
|
||||
...mochaLanguageOptions,
|
||||
...cypressLanguageOptions,
|
||||
...cypressRecommended.languageOptions,
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
...(cypressRecommended.languageOptions?.globals ?? {}),
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
mocha: mochaPlugin,
|
||||
cypress: cypressPlugin,
|
||||
},
|
||||
},
|
||||
|
||||
prettierPlugin,
|
||||
]
|
||||
]);
|
||||
|
||||
Generated
+2166
-128
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -66,18 +66,20 @@
|
||||
"author": "",
|
||||
"devDependencies": {
|
||||
"@cypress/code-coverage": "^3.13.2",
|
||||
"@eslint/js": "^9.14.0",
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@types/leaflet": "^1.9.12",
|
||||
"cypress": "^13.11.0",
|
||||
"eslint": "^9.14.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-cypress": "^4.1.0",
|
||||
"eslint-plugin-mocha": "^10.5.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"globals": "^15.12.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"globals": "^15.15.0",
|
||||
"husky": "^9.1.7",
|
||||
"prettier": "^3.3.3",
|
||||
"supertest": "^7.0.0",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.47.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user