mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 14:49:36 +02:00
Upgrade ESLint and fix linting issues
Some checks failed
test / lint (push) Has been cancelled
test / unit-tests (16.x) (push) Has been cancelled
test / unit-tests (18.x) (push) Has been cancelled
test / unit-tests (20.x) (push) Has been cancelled
test / unit-tests (22.x) (push) Has been cancelled
test / integration-tests (16.x) (push) Has been cancelled
test / integration-tests (18.x) (push) Has been cancelled
test / integration-tests (20.x) (push) Has been cancelled
test / integration-tests (22.x) (push) Has been cancelled
test / e2e-tests (18.x) (push) Has been cancelled
Some checks failed
test / lint (push) Has been cancelled
test / unit-tests (16.x) (push) Has been cancelled
test / unit-tests (18.x) (push) Has been cancelled
test / unit-tests (20.x) (push) Has been cancelled
test / unit-tests (22.x) (push) Has been cancelled
test / integration-tests (16.x) (push) Has been cancelled
test / integration-tests (18.x) (push) Has been cancelled
test / integration-tests (20.x) (push) Has been cancelled
test / integration-tests (22.x) (push) Has been cancelled
test / e2e-tests (18.x) (push) Has been cancelled
This commit is contained in:
parent
afa99b0742
commit
6d1d0c626f
6 changed files with 459 additions and 469 deletions
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"env": {
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "plugin:@stylistic/all-extends"],
|
||||
"ignorePatterns": ["node_modules", "*example.js"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2021,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"curly": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "none",
|
||||
"ignoreRestSiblings": false
|
||||
}
|
||||
],
|
||||
"@stylistic/array-bracket-newline": ["error", "consistent"],
|
||||
"@stylistic/array-element-newline": ["error", "consistent"],
|
||||
"@stylistic/arrow-parens": "off",
|
||||
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
||||
"@stylistic/dot-location": ["error", "property"],
|
||||
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
||||
"@stylistic/function-paren-newline": "off",
|
||||
"@stylistic/indent": ["error", "tab"],
|
||||
"@stylistic/indent-binary-ops": ["error", "tab"],
|
||||
"@stylistic/max-len": "off",
|
||||
"@stylistic/multiline-ternary": ["error", "always-multiline"],
|
||||
"@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 1 }],
|
||||
"@stylistic/no-mixed-operators": "off",
|
||||
"@stylistic/no-tabs": "off",
|
||||
"@stylistic/object-property-newline": "off",
|
||||
"@stylistic/one-var-declaration-per-line": "off",
|
||||
"@stylistic/operator-linebreak": ["error", "before"],
|
||||
"@stylistic/padded-blocks": "off",
|
||||
"@stylistic/quote-props": ["error", "consistent-as-needed"],
|
||||
"@stylistic/quotes": ["error", "single"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"test/**"
|
||||
],
|
||||
"rules": {
|
||||
"no-unused-vars": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
61
eslint.config.js
Normal file
61
eslint.config.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
import eslintPluginJs from '@eslint/js';
|
||||
import eslintPluginStylistic from '@stylistic/eslint-plugin';
|
||||
import globals from 'globals';
|
||||
|
||||
|
||||
const config = [
|
||||
eslintPluginJs.configs.recommended,
|
||||
eslintPluginStylistic.configs['all-flat'],
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
'@stylistic/array-bracket-newline': ['error', 'consistent'],
|
||||
'@stylistic/array-element-newline': ['error', 'consistent'],
|
||||
'@stylistic/arrow-parens': 'off',
|
||||
'@stylistic/comma-dangle': ['error', 'always-multiline'],
|
||||
'@stylistic/dot-location': ['error', 'property'],
|
||||
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
||||
'@stylistic/function-paren-newline': 'off',
|
||||
'@stylistic/indent': ['error', 'tab'],
|
||||
'@stylistic/indent-binary-ops': ['error', 'tab'],
|
||||
'@stylistic/max-len': 'off',
|
||||
'@stylistic/multiline-comment-style': 'off',
|
||||
'@stylistic/multiline-ternary': ['error', 'always-multiline'],
|
||||
'@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 1}],
|
||||
'@stylistic/no-mixed-operators': 'off',
|
||||
'@stylistic/no-tabs': 'off',
|
||||
'@stylistic/object-property-newline': 'off',
|
||||
'@stylistic/one-var-declaration-per-line': 'off',
|
||||
'@stylistic/operator-linebreak': ['error', 'before'],
|
||||
'@stylistic/padded-blocks': 'off',
|
||||
'@stylistic/quote-props': ['error', 'consistent-as-needed'],
|
||||
'@stylistic/quotes': ['error', 'single'],
|
||||
'curly': 'error',
|
||||
'no-implicit-coercion': 'error',
|
||||
'no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
vars: 'all',
|
||||
args: 'none',
|
||||
ignoreRestSiblings: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['test/**', '**/example.js'],
|
||||
rules: {
|
||||
'no-unused-vars': 'off',
|
||||
'@stylistic/semi': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default config;
|
787
package-lock.json
generated
787
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -72,9 +72,9 @@
|
|||
"@pollyjs/adapter-node-http": "^6.0.5",
|
||||
"@pollyjs/core": "^6.0.5",
|
||||
"@pollyjs/persister-fs": "^6.0.5",
|
||||
"@stylistic/eslint-plugin": "^1.5.1",
|
||||
"@stylistic/eslint-plugin": "^3.1.0",
|
||||
"db-rest": "github:derhuerst/db-rest",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint": "^9.20.1",
|
||||
"hafas-rest-api": "^5.1.3",
|
||||
"is-coordinates": "^2.0.2",
|
||||
"is-roughly-equal": "^0.1.0",
|
||||
|
@ -84,8 +84,8 @@
|
|||
"validate-fptf": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"test-unit": "tap test/lib/*.js test/*.js test/format/*.js test/parse/*.js",
|
||||
"test-integration": "VCR_MODE=playback tap test/e2e/*.js",
|
||||
"test-integration:record": "VCR_MODE=record tap -t60 -j1 test/e2e/*.js",
|
||||
|
|
Loading…
Add table
Reference in a new issue