Skip to content

Commit

Permalink
Fix project path being set to static/static/tsconfig.json in eslint r…
Browse files Browse the repository at this point in the history
…uns (#3514)
  • Loading branch information
RubenRBS committed Apr 18, 2022
1 parent 6d61651 commit 204d777
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 40 deletions.
50 changes: 50 additions & 0 deletions static/.eslintrc.js
@@ -0,0 +1,50 @@
// This file is in js due to #3514

module.exports = {
root: true,
plugins: [
'promise',
'requirejs',
],
extends: ['./.eslint-ce-static.yml'],
rules: {
'promise/catch-or-return': 'off',
'promise/no-new-statics': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/valid-params': 'error',
},
overrides: [{
files: ['*.ts'],
plugins: [
'import',
'@typescript-eslint',
],
extends: [
'./.eslint-ce-static.yml',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
env: {
browser: true,
es6: true,
node: false,
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off', // Needed for now, can't move some
'@typescript-eslint/no-explicit-any': 'off', // Too much js code still exists
'@typescript-eslint/ban-ts-comment': 'off', // We need some @ts-ignore at some points
'@typescript-eslint/no-unnecessary-condition': 'warn', // for now just warn
},
}],
};
40 changes: 0 additions & 40 deletions static/.eslintrc.yml

This file was deleted.

0 comments on commit 204d777

Please sign in to comment.