From 2adf4df7d7786dbe827227da04de324dee7c8575 Mon Sep 17 00:00:00 2001 From: Jordan Reimer Date: Wed, 12 Jan 2022 08:20:11 -0700 Subject: [PATCH] updates template lint config to override rules in test files for ember language server (#13632) --- ui/.template-lintrc.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ui/.template-lintrc.js b/ui/.template-lintrc.js index e74aa69c8..3b0e2a354 100644 --- a/ui/.template-lintrc.js +++ b/ui/.template-lintrc.js @@ -1,4 +1,11 @@ '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 = { extends: ['octane', 'stylistic'], @@ -14,4 +21,12 @@ module.exports = { 'self-closing-void-elements': 'off', }, 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, + }, + ], };