Files
threshold-ui/addons/auth/eslint.config.js
T
Zhihe Li 999c21c66a 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
2026-02-27 13:32:27 -05:00

92 lines
2.4 KiB
JavaScript

/**
* 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-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/',
]),
]);