Upgrade eslint (#3175)
* chore: 🤖 Upgrade eslint config for admin ui * chore: 🤖 Fix eslint issues for admin * chore: 🤖 Upgrade eslint config for desktop * chore: 🤖 Fix linting errors in desktop * chore: 🤖 Upgrade eslint for api addon * chore: 🤖 Fix eslint issues in api addon * chore: 🤖 Upgrade eslint for auth addon * chore: 🤖 Fix eslint issues in auth addon * chore: 🤖 Upgrade core eslint config * chore: 🤖 Fix eslint issue for core addon * chore: 🤖 Upgrade eslint config for rose addon * chore: 🤖 Fix eslint issue for rose addon * chore: 🤖 Upgrade e2e eslint config * chore: 🤖 Fix eslint issues in e2e * chore: 🤖 Fix CI linting issues * chore: 🤖 Add back linting server files for the future * chore: 🤖 Update qunit rules to use extends
This commit is contained in:
1 parent
d6e8e58ca1
commit
999c21c66a
73 files changed
+1081
-922
No files matched your search
@@ -1,14 +0,0 @@
|
||||
# unconventional js
|
||||
/blueprints/*/files/
|
||||
|
||||
# compiled output
|
||||
/declarations/
|
||||
/dist/
|
||||
|
||||
# misc
|
||||
/coverage/
|
||||
!.*
|
||||
.*/
|
||||
|
||||
# ember-try
|
||||
/.node_modules.ember-try/
|
||||
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* Copyright IBM Corp. 2021, 2026
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@babel/eslint-parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
// This is specific babel-config. If grows consider creating a babel config file
|
||||
requireConfigFile: false,
|
||||
babelOptions: {
|
||||
plugins: [
|
||||
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
|
||||
],
|
||||
},
|
||||
// end of babel-config
|
||||
},
|
||||
plugins: ['ember'],
|
||||
extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'],
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
rules: {
|
||||
curly: ['error', 'multi-line', 'consistent'],
|
||||
'ember/no-jquery': 'error',
|
||||
'ember/no-new-mixins': 0,
|
||||
'ember/no-get': 'off',
|
||||
'ember/no-get-with-default': 'off',
|
||||
'ember/no-computed-properties-in-native-classes': 'off',
|
||||
'ember/no-assignment-of-untracked-properties-used-in-tracking-contexts':
|
||||
'off',
|
||||
},
|
||||
overrides: [
|
||||
// node files
|
||||
{
|
||||
files: [
|
||||
'./.eslintrc.js',
|
||||
'./.prettierrc.js',
|
||||
'./.stylelintrc.js',
|
||||
'./.template-lintrc.js',
|
||||
'./ember-cli-build.js',
|
||||
'./index.js',
|
||||
'./testem.js',
|
||||
'./blueprints/*/index.js',
|
||||
'./config/**/*.js',
|
||||
'./tests/dummy/config/**/*.js',
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script',
|
||||
},
|
||||
env: {
|
||||
browser: false,
|
||||
node: true,
|
||||
},
|
||||
extends: ['plugin:n/recommended'],
|
||||
},
|
||||
{
|
||||
// test files
|
||||
files: ['tests/**/*-test.{js,ts}'],
|
||||
extends: ['plugin:qunit/recommended'],
|
||||
rules: {
|
||||
'qunit/require-expect': [2, 'except-simple'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Copyright IBM Corp. 2021, 2026
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/* eslint-disable n/no-unpublished-require */
|
||||
const { defineConfig, globalIgnores } = require('eslint/config');
|
||||
const babelParser = require('@babel/eslint-parser');
|
||||
const js = require('@eslint/js');
|
||||
const eslintPluginEmberRecommended = require('eslint-plugin-ember/configs/recommended');
|
||||
const nPlugin = require('eslint-plugin-n');
|
||||
const qunitPlugin = require('eslint-plugin-qunit');
|
||||
const eslintConfigPrettier = require('eslint-config-prettier/flat');
|
||||
const globals = require('globals');
|
||||
|
||||
module.exports = defineConfig([
|
||||
js.configs.recommended,
|
||||
...eslintPluginEmberRecommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parser: babelParser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
requireConfigFile: false,
|
||||
// This is specific babel-config. If it grows consider creating a babel config file
|
||||
babelOptions: {
|
||||
plugins: [
|
||||
[
|
||||
'@babel/plugin-proposal-decorators',
|
||||
{ decoratorsBeforeExport: true },
|
||||
],
|
||||
],
|
||||
},
|
||||
// end of babel-config
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
curly: ['error', 'multi-line', 'consistent'],
|
||||
'ember/no-jquery': 'error',
|
||||
'ember/no-new-mixins': 0,
|
||||
'ember/no-get': 'off',
|
||||
'ember/no-get-with-default': 'off',
|
||||
'ember/no-computed-properties-in-native-classes': 'off',
|
||||
'ember/no-assignment-of-untracked-properties-used-in-tracking-contexts':
|
||||
'off',
|
||||
},
|
||||
},
|
||||
|
||||
// Node files configuration
|
||||
{
|
||||
files: [
|
||||
'eslint.config.js',
|
||||
'.prettierrc.js',
|
||||
'.stylelintrc.js',
|
||||
'.template-lintrc.js',
|
||||
'ember-cli-build.js',
|
||||
'index.js',
|
||||
'testem.js',
|
||||
'blueprints/*/index.js',
|
||||
'config/**/*.js',
|
||||
'tests/dummy/config/**/*.js',
|
||||
],
|
||||
plugins: { n: nPlugin },
|
||||
extends: [nPlugin.configs['flat/recommended-script']],
|
||||
},
|
||||
|
||||
// Test files configuration
|
||||
{
|
||||
files: ['tests/**/*-test.{js,ts}'],
|
||||
extends: [
|
||||
{ ...qunitPlugin.configs.recommended, plugins: { qunit: qunitPlugin } },
|
||||
],
|
||||
rules: {
|
||||
'qunit/require-expect': [2, 'except-simple'],
|
||||
},
|
||||
},
|
||||
// Prettier should be last
|
||||
eslintConfigPrettier,
|
||||
globalIgnores([
|
||||
'blueprints/*/files/',
|
||||
'declarations/',
|
||||
'dist/',
|
||||
'coverage/',
|
||||
'**/.*/',
|
||||
'.node_modules.ember-try/',
|
||||
]),
|
||||
]);
|
||||
@@ -76,11 +76,13 @@
|
||||
"ember-template-lint": "^6.0.0",
|
||||
"ember-template-lint-plugin-prettier": "^5.0.0",
|
||||
"ember-try": "^3.0.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-ember": "^12.2.1",
|
||||
"eslint-plugin-n": "^16.6.2",
|
||||
"eslint-plugin-qunit": "^8.1.2",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-ember": "^12.7.5",
|
||||
"eslint-plugin-n": "^17.24.0",
|
||||
"eslint-plugin-qunit": "^8.2.6",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"globals": "^15.14.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"postcss": "^8.4.31",
|
||||
"prettier": "^3.3.3",
|
||||
|
||||
@@ -10,8 +10,5 @@ export default class PlaygroundController extends Controller {
|
||||
color = 'green';
|
||||
|
||||
@action
|
||||
actionHandler(/*value*/) {
|
||||
// eslint-disable-next-line no-console
|
||||
//console.log('action handled');
|
||||
}
|
||||
actionHandler(/*value*/) {}
|
||||
}
|
||||
Reference in new issue
Block a user