mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-11-04 01:56:33 +02:00 
			
		
		
		
	linting: add rules based on @stylistic/eslint-plugin
Co-Authored-By: Jannis R <mail@jannisr.de>
This commit is contained in:
		
							parent
							
								
									26c56f8dc6
								
							
						
					
					
						commit
						228c72531b
					
				
					 2 changed files with 27 additions and 7 deletions
				
			
		| 
						 | 
					@ -3,17 +3,15 @@
 | 
				
			||||||
        "es2021": true,
 | 
					        "es2021": true,
 | 
				
			||||||
        "node": true
 | 
					        "node": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "extends": "eslint:recommended",
 | 
					    "extends": ["eslint:recommended", "plugin:@stylistic/all-extends"],
 | 
				
			||||||
    "globals": {
 | 
					 | 
				
			||||||
        "Atomics": "readonly",
 | 
					 | 
				
			||||||
        "SharedArrayBuffer": "readonly"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "ignorePatterns": ["node_modules", "*example.js"],
 | 
					    "ignorePatterns": ["node_modules", "*example.js"],
 | 
				
			||||||
    "parserOptions": {
 | 
					    "parserOptions": {
 | 
				
			||||||
        "ecmaVersion": 2021,
 | 
					        "ecmaVersion": 2021,
 | 
				
			||||||
        "sourceType": "module"
 | 
					        "sourceType": "module"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "rules": {
 | 
					    "rules": {
 | 
				
			||||||
 | 
					        "curly": "error",
 | 
				
			||||||
 | 
					        "no-implicit-coercion": "error",
 | 
				
			||||||
        "no-unused-vars": [
 | 
					        "no-unused-vars": [
 | 
				
			||||||
            "error",
 | 
					            "error",
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					@ -21,7 +19,27 @@
 | 
				
			||||||
                "args": "none",
 | 
					                "args": "none",
 | 
				
			||||||
                "ignoreRestSiblings": false
 | 
					                "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": [
 | 
					    "overrides": [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,8 @@
 | 
				
			||||||
		"@pollyjs/adapter-node-http": "^6.0.5",
 | 
							"@pollyjs/adapter-node-http": "^6.0.5",
 | 
				
			||||||
		"@pollyjs/core": "^6.0.5",
 | 
							"@pollyjs/core": "^6.0.5",
 | 
				
			||||||
		"@pollyjs/persister-fs": "^6.0.5",
 | 
							"@pollyjs/persister-fs": "^6.0.5",
 | 
				
			||||||
		"eslint": "^8.15.0",
 | 
							"@stylistic/eslint-plugin": "^1.5.1",
 | 
				
			||||||
 | 
							"eslint": "^8.56.0",
 | 
				
			||||||
		"is-coordinates": "^2.0.2",
 | 
							"is-coordinates": "^2.0.2",
 | 
				
			||||||
		"is-roughly-equal": "^0.1.0",
 | 
							"is-roughly-equal": "^0.1.0",
 | 
				
			||||||
		"tap": "^18.0.4",
 | 
							"tap": "^18.0.4",
 | 
				
			||||||
| 
						 | 
					@ -74,6 +75,7 @@
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"scripts": {
 | 
						"scripts": {
 | 
				
			||||||
		"lint": "eslint .",
 | 
							"lint": "eslint .",
 | 
				
			||||||
 | 
							"lint:fix": "eslint . --fix",
 | 
				
			||||||
		"test-unit": "tap test/lib/*.js test/*.js test/format/*.js test/parse/*.js",
 | 
							"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": "VCR_MODE=playback tap test/e2e/*.js",
 | 
				
			||||||
		"test-integration:record": "VCR_MODE=record tap -t60 -j1 test/e2e/*.js",
 | 
							"test-integration:record": "VCR_MODE=record tap -t60 -j1 test/e2e/*.js",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue