diff --git a/.eslintrc.js b/.eslintrc.js index 5c26d62d5..24c624ac0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,15 +2,11 @@ module.exports = { root: true, - parser: 'babel-eslint', + parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2018, - sourceType: 'module', - ecmaFeatures: { - legacyDecorators: true, - }, + ecmaVersion: 'latest', }, - plugins: ['ember'], + plugins: ['ember', '@typescript-eslint'], extends: [ 'eslint:recommended', 'plugin:ember/recommended', @@ -37,6 +33,15 @@ module.exports = { ], }, overrides: [ + // ts files + { + files: ['**/*.ts'], + extends: [ + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + ], + rules: {}, + }, // node files { files: [ @@ -52,9 +57,6 @@ module.exports = { './.stylelintrc.js', './.stylelintrc.order.js', ], - parserOptions: { - sourceType: 'script', - }, env: { browser: false, node: true, @@ -72,5 +74,17 @@ module.exports = { files: ['tests/**/*-test.{js,ts}'], extends: ['plugin:qunit/recommended'], }, + // js files // TODO: remove when fully over to ts + { + files: ['**/*.js'], + parser: 'babel-eslint', + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true, + }, + }, + }, ], }; diff --git a/app/app.js b/app/app.ts similarity index 100% rename from app/app.js rename to app/app.ts diff --git a/app/components/advertisement-tool.hbs b/app/components/advertisement-tool.hbs index 453fe339c..4f0ba0f59 100644 --- a/app/components/advertisement-tool.hbs +++ b/app/components/advertisement-tool.hbs @@ -3,7 +3,10 @@
{{#each advertisements as |advertisement index|}} {{#if advertisement.links}} -