Replace TS eslint with `typescript-eslint`
This replaces the older @typescript-eslint/* packages with new flat-file aware configuration.
This commit is contained in:
		
							parent
							
								
									c8b83dd87c
								
							
						
					
					
						commit
						9f888670d1
					
				| 
						 | 
				
			
			@ -1,18 +1,16 @@
 | 
			
		|||
// @ts-check
 | 
			
		||||
import globals from "globals";
 | 
			
		||||
import eslint from "@eslint/js";
 | 
			
		||||
import tseslint from "typescript-eslint";
 | 
			
		||||
 | 
			
		||||
export default tseslint.config(
 | 
			
		||||
	{
 | 
			
		||||
		ignores: ["**/node_modules/", "**/main.js"],
 | 
			
		||||
	},
 | 
			
		||||
	eslint.configs.recommended,
 | 
			
		||||
	...tseslint.configs.recommended,
 | 
			
		||||
	{
 | 
			
		||||
		plugins: {
 | 
			
		||||
			"@typescript-eslint": tseslint.plugin,
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		languageOptions: {
 | 
			
		||||
			globals: {
 | 
			
		||||
				...globals.node,
 | 
			
		||||
| 
						 | 
				
			
			@ -21,17 +19,14 @@ export default tseslint.config(
 | 
			
		|||
			ecmaVersion: 5,
 | 
			
		||||
			sourceType: "module",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		rules: {
 | 
			
		||||
			"no-unused-vars": "off",
 | 
			
		||||
 | 
			
		||||
			"@typescript-eslint/no-unused-vars": [
 | 
			
		||||
				"error",
 | 
			
		||||
				{
 | 
			
		||||
					args: "none",
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
 | 
			
		||||
			"@typescript-eslint/ban-ts-comment": "off",
 | 
			
		||||
			"no-prototype-builtins": "off",
 | 
			
		||||
			"@typescript-eslint/no-empty-function": "off",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,8 +9,6 @@
 | 
			
		|||
			"version": "1.0.0",
 | 
			
		||||
			"license": "MIT",
 | 
			
		||||
			"devDependencies": {
 | 
			
		||||
				"@eslint/eslintrc": "^3.1.0",
 | 
			
		||||
				"@eslint/js": "^9.8.0",
 | 
			
		||||
				"@types/node": "^16.11.6",
 | 
			
		||||
				"builtin-modules": "^4.0.0",
 | 
			
		||||
				"esbuild": "^0.23.0",
 | 
			
		||||
| 
						 | 
				
			
			@ -449,50 +447,6 @@
 | 
			
		|||
				"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/@eslint/eslintrc": {
 | 
			
		||||
			"version": "3.1.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz",
 | 
			
		||||
			"integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"dependencies": {
 | 
			
		||||
				"ajv": "^6.12.4",
 | 
			
		||||
				"debug": "^4.3.2",
 | 
			
		||||
				"espree": "^10.0.1",
 | 
			
		||||
				"globals": "^14.0.0",
 | 
			
		||||
				"ignore": "^5.2.0",
 | 
			
		||||
				"import-fresh": "^3.2.1",
 | 
			
		||||
				"js-yaml": "^4.1.0",
 | 
			
		||||
				"minimatch": "^3.1.2",
 | 
			
		||||
				"strip-json-comments": "^3.1.1"
 | 
			
		||||
			},
 | 
			
		||||
			"engines": {
 | 
			
		||||
				"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
			},
 | 
			
		||||
			"funding": {
 | 
			
		||||
				"url": "https://opencollective.com/eslint"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/@eslint/eslintrc/node_modules/globals": {
 | 
			
		||||
			"version": "14.0.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
 | 
			
		||||
			"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"engines": {
 | 
			
		||||
				"node": ">=18"
 | 
			
		||||
			},
 | 
			
		||||
			"funding": {
 | 
			
		||||
				"url": "https://github.com/sponsors/sindresorhus"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/@eslint/js": {
 | 
			
		||||
			"version": "9.8.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.8.0.tgz",
 | 
			
		||||
			"integrity": "sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"engines": {
 | 
			
		||||
				"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/@humanwhocodes/config-array": {
 | 
			
		||||
			"version": "0.11.14",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
 | 
			
		||||
| 
						 | 
				
			
			@ -1229,35 +1183,6 @@
 | 
			
		|||
				"url": "https://github.com/sponsors/sindresorhus"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/espree": {
 | 
			
		||||
			"version": "10.1.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz",
 | 
			
		||||
			"integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"dependencies": {
 | 
			
		||||
				"acorn": "^8.12.0",
 | 
			
		||||
				"acorn-jsx": "^5.3.2",
 | 
			
		||||
				"eslint-visitor-keys": "^4.0.0"
 | 
			
		||||
			},
 | 
			
		||||
			"engines": {
 | 
			
		||||
				"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
			},
 | 
			
		||||
			"funding": {
 | 
			
		||||
				"url": "https://opencollective.com/eslint"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/espree/node_modules/eslint-visitor-keys": {
 | 
			
		||||
			"version": "4.0.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz",
 | 
			
		||||
			"integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"engines": {
 | 
			
		||||
				"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
			},
 | 
			
		||||
			"funding": {
 | 
			
		||||
				"url": "https://opencollective.com/eslint"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"node_modules/esquery": {
 | 
			
		||||
			"version": "1.6.0",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,8 +12,6 @@
 | 
			
		|||
	"author": "",
 | 
			
		||||
	"license": "MIT",
 | 
			
		||||
	"devDependencies": {
 | 
			
		||||
		"@eslint/eslintrc": "^3.1.0",
 | 
			
		||||
		"@eslint/js": "^9.8.0",
 | 
			
		||||
		"@types/node": "^16.11.6",
 | 
			
		||||
		"builtin-modules": "^4.0.0",
 | 
			
		||||
		"esbuild": "^0.23.0",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue