mirror of
https://github.com/theoludwig/eslint-config-conventions.git
synced 2024-12-18 21:45:04 +01:00
test: ensure we do not use deprecated rules
This commit is contained in:
parent
19f74fc6a2
commit
2db017e805
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user