mirror of
				https://github.com/theoludwig/eslint-config-conventions.git
				synced 2025-10-21 07:35:11 +02:00 
			
		
		
		
	test: ensure we do not use deprecated rules
This commit is contained in:
		| @@ -129,7 +129,6 @@ | ||||
|     "no-var": "error", | ||||
|     "no-void": ["error", { "allowAsStatement": true }], | ||||
|     "no-with": "error", | ||||
|     "no-return-await": "error", | ||||
|     "object-shorthand": ["error", "properties"], | ||||
|     "one-var": ["error", { "initialized": "never" }], | ||||
|     "prefer-const": ["error", { "destructuring": "all" }], | ||||
|   | ||||
| @@ -20,6 +20,17 @@ test("ensure we validate correctly JavaScript files", async () => { | ||||
|   assert.strictEqual(withErrors?.errorCount, 3) | ||||
| }) | ||||
|  | ||||
| test("ensure we do not use deprecated rules", async () => { | ||||
|   const [javascriptLintResult] = await eslint.lintFiles( | ||||
|     "test/fixtures/javascript-no-errors.js", | ||||
|   ) | ||||
|   const [typescriptLintResult] = await eslint.lintFiles( | ||||
|     "test/fixtures/typescript-no-errors.ts", | ||||
|   ) | ||||
|   assert.strictEqual(javascriptLintResult.usedDeprecatedRules.length, 0) | ||||
|   assert.strictEqual(typescriptLintResult.usedDeprecatedRules.length, 0) | ||||
| }) | ||||
|  | ||||
| test("ensure we validate correctly TypeScript files", async () => { | ||||
|   const [noErrors] = await eslint.lintFiles( | ||||
|     "test/fixtures/typescript-no-errors.ts", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user