updates template lint config to override rules in test files for ember language server (#13632)
This commit is contained in:
parent
fc75aabd03
commit
2adf4df7d7
|
@ -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,
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue