2023-04-10 15:36:59 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2020-07-09 16:37:00 +00:00
|
|
|
'use strict';
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
module.exports = {
|
2019-10-15 18:32:58 +00:00
|
|
|
root: true,
|
2020-05-26 14:56:25 +00:00
|
|
|
parser: 'babel-eslint',
|
2017-09-19 14:47:10 +00:00
|
|
|
parserOptions: {
|
2019-04-02 22:59:16 +00:00
|
|
|
ecmaVersion: 2018,
|
2017-09-19 14:47:10 +00:00
|
|
|
sourceType: 'module',
|
2020-06-10 13:49:16 +00:00
|
|
|
ecmaFeatures: {
|
|
|
|
legacyDecorators: true,
|
|
|
|
},
|
2017-09-19 14:47:10 +00:00
|
|
|
},
|
2021-12-28 14:33:58 +00:00
|
|
|
globals: {
|
|
|
|
server: true,
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
},
|
|
|
|
plugins: ['ember'],
|
2021-12-28 16:05:16 +00:00
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:ember/recommended',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
],
|
2017-09-19 14:47:10 +00:00
|
|
|
rules: {
|
2020-06-22 15:48:53 +00:00
|
|
|
'ember/classic-decorator-hooks': 'error',
|
|
|
|
'ember/classic-decorator-no-classic-methods': 'error',
|
2021-02-17 21:01:44 +00:00
|
|
|
'ember/no-get': 'off',
|
|
|
|
'ember/no-mixins': 'off',
|
2021-12-28 14:51:29 +00:00
|
|
|
'ember/no-classic-classes': 'off',
|
2021-12-28 15:27:37 +00:00
|
|
|
'ember/no-computed-properties-in-native-classes': 'off',
|
2021-12-28 15:46:02 +00:00
|
|
|
'ember/no-classic-components': 'off',
|
2021-12-28 15:46:53 +00:00
|
|
|
'ember/no-component-lifecycle-hooks': 'off',
|
2021-12-28 15:47:54 +00:00
|
|
|
'ember/require-tagless-components': 'off',
|
2017-09-19 14:47:10 +00:00
|
|
|
},
|
2019-03-12 23:42:47 +00:00
|
|
|
overrides: [
|
|
|
|
// node files
|
|
|
|
{
|
|
|
|
files: [
|
2022-03-08 17:28:36 +00:00
|
|
|
'./.eslintrc.js',
|
|
|
|
'./.prettierrc.js',
|
|
|
|
'./.template-lintrc.js',
|
|
|
|
'./ember-cli-build.js',
|
|
|
|
'./testem.js',
|
|
|
|
'./blueprints/*/index.js',
|
|
|
|
'./config/**/*.js',
|
|
|
|
'./lib/*/index.js',
|
|
|
|
'./server/**/*.js',
|
|
|
|
'./tests/.eslintrc.js',
|
2019-03-12 23:42:47 +00:00
|
|
|
],
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'script',
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: false,
|
2019-03-13 00:40:39 +00:00
|
|
|
node: true,
|
|
|
|
},
|
2019-10-15 18:32:58 +00:00
|
|
|
plugins: ['node'],
|
2021-12-28 16:05:16 +00:00
|
|
|
extends: ['plugin:node/recommended'],
|
2021-02-17 21:01:44 +00:00
|
|
|
rules: {
|
2021-12-28 14:33:58 +00:00
|
|
|
// this can be removed once the following is fixed
|
|
|
|
// https://github.com/mysticatea/eslint-plugin-node/issues/77
|
|
|
|
'node/no-unpublished-require': 'off',
|
2021-02-17 21:01:44 +00:00
|
|
|
},
|
2019-03-13 00:40:39 +00:00
|
|
|
},
|
2020-01-21 21:46:32 +00:00
|
|
|
{
|
2021-12-28 14:33:58 +00:00
|
|
|
files: ['stories/**/*.js'],
|
2020-01-21 21:46:32 +00:00
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: false,
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
plugins: ['node'],
|
|
|
|
},
|
2022-03-08 17:28:36 +00:00
|
|
|
{
|
|
|
|
// Test files:
|
|
|
|
files: ['tests/**/*-test.{js,ts}'],
|
|
|
|
extends: ['plugin:qunit/recommended'],
|
|
|
|
},
|
2019-03-13 00:40:39 +00:00
|
|
|
],
|
2017-09-19 14:47:10 +00:00
|
|
|
};
|