2017-05-29 21:50:03 +03:00
|
|
|
/* eslint-env node */
|
2016-10-14 13:23:51 +03:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
2022-02-10 13:41:36 +03:00
|
|
|
parser: '@babel/eslint-parser',
|
2019-12-13 18:15:06 +03:00
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
2022-02-10 13:41:36 +03:00
|
|
|
allowImportExportEverywhere: false,
|
2019-12-13 18:15:06 +03:00
|
|
|
ecmaFeatures: {
|
2022-02-10 13:41:36 +03:00
|
|
|
globalReturn: false,
|
2022-07-18 15:59:49 +03:00
|
|
|
legacyDecorators: true,
|
|
|
|
jsx: true
|
2022-02-10 13:41:36 +03:00
|
|
|
},
|
|
|
|
requireConfigFile: false,
|
|
|
|
babelOptions: {
|
2022-07-18 15:59:49 +03:00
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
|
|
|
['@babel/plugin-proposal-decorators', {legacy: true}],
|
|
|
|
'babel-plugin-transform-react-jsx'
|
|
|
|
]
|
2019-12-13 18:15:06 +03:00
|
|
|
}
|
|
|
|
},
|
2017-05-29 21:50:03 +03:00
|
|
|
plugins: [
|
2022-07-18 15:59:49 +03:00
|
|
|
'ghost',
|
|
|
|
'react'
|
2018-01-05 18:38:23 +03:00
|
|
|
],
|
|
|
|
extends: [
|
|
|
|
'plugin:ghost/ember'
|
2017-05-29 21:50:03 +03:00
|
|
|
],
|
2016-10-14 13:23:51 +03:00
|
|
|
rules: {
|
2023-05-02 23:43:47 +03:00
|
|
|
'ghost/filenames/match-exported-class': ['off'],
|
|
|
|
'ghost/filenames/match-regex': ['off'],
|
2020-10-05 11:56:21 +03:00
|
|
|
'no-shadow': ['error'],
|
|
|
|
|
2020-10-23 11:58:55 +03:00
|
|
|
// TODO: migrate away from accessing controller in routes
|
|
|
|
'ghost/ember/no-controller-access-in-routes': 'off',
|
|
|
|
|
|
|
|
// TODO: enable once we're fully on octane 🏎
|
|
|
|
'ghost/ember/no-assignment-of-untracked-properties-used-in-tracking-contexts': 'off',
|
|
|
|
'ghost/ember/no-actions-hash': 'off',
|
|
|
|
'ghost/ember/no-classic-classes': 'off',
|
|
|
|
'ghost/ember/no-classic-components': 'off',
|
|
|
|
'ghost/ember/require-tagless-components': 'off',
|
|
|
|
'ghost/ember/no-component-lifecycle-hooks': 'off',
|
2020-05-20 16:55:41 +03:00
|
|
|
|
2018-01-05 18:38:23 +03:00
|
|
|
// disable linting of `this.get` until there's a reliable autofix
|
2020-01-16 20:01:12 +03:00
|
|
|
'ghost/ember/use-ember-get-and-set': 'off',
|
|
|
|
|
|
|
|
// disable linting of mixins until we migrate away
|
2020-05-06 20:06:42 +03:00
|
|
|
'ghost/ember/no-mixins': 'off',
|
2022-07-18 15:59:49 +03:00
|
|
|
'ghost/ember/no-new-mixins': 'off',
|
|
|
|
|
|
|
|
'react/jsx-uses-react': 'error',
|
|
|
|
'react/jsx-uses-vars': 'error'
|
2016-10-14 13:23:51 +03:00
|
|
|
}
|
|
|
|
};
|