updates template lint config to override rules in test files for ember language server (#13632)

This commit is contained in:
Jordan Reimer 2022-01-12 08:20:11 -07:00 committed by GitHub
parent fc75aabd03
commit 2adf4df7d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -1,4 +1,11 @@
'use strict'; 'use strict';
const recommended = require('ember-template-lint/lib/config/recommended').rules; // octane extends recommended - no additions as of 3.14
const stylistic = require('ember-template-lint/lib/config/stylistic').rules;
const testOverrides = { ...recommended, ...stylistic };
for (const key in testOverrides) {
testOverrides[key] = false;
}
module.exports = { module.exports = {
extends: ['octane', 'stylistic'], extends: ['octane', 'stylistic'],
@ -14,4 +21,12 @@ module.exports = {
'self-closing-void-elements': 'off', 'self-closing-void-elements': 'off',
}, },
ignore: ['lib/story-md', 'tests/**'], ignore: ['lib/story-md', 'tests/**'],
// ember language server vscode extension does not currently respect the ignore field
// override all rules manually as workround to align with cli
overrides: [
{
files: ['**/*-test.js'],
rules: testOverrides,
},
],
}; };