2022-11-09 11:02:35 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser',
|
2022-11-28 13:31:15 +01:00
|
|
|
parserOptions: {
|
|
|
|
project: './tsconfig.eslint.json',
|
|
|
|
},
|
2022-11-09 11:02:35 +01:00
|
|
|
plugins: ['@typescript-eslint'],
|
2022-11-28 13:31:15 +01:00
|
|
|
extends: ['@strapi/eslint-config/typescript'],
|
2022-11-09 11:02:35 +01:00
|
|
|
globals: {
|
|
|
|
strapi: false,
|
|
|
|
},
|
2022-11-15 08:41:33 +01:00
|
|
|
// Instead of extending (which includes values that interfere with this configuration), only take the rules field
|
2022-11-17 21:19:33 +01:00
|
|
|
rules: {
|
|
|
|
...require('./.eslintrc.back.js').rules,
|
|
|
|
'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/*.test.ts'] }],
|
2022-11-28 16:23:49 +01:00
|
|
|
// TODO: The following rules from @strapi/eslint-config/typescript are disabled because they're causing problems we need to solve or fix
|
|
|
|
// to be solved (that is, we want to keep the rule, but it shouldn't be reported in the places it is)
|
|
|
|
'node/no-unsupported-features/es-syntax': 'off',
|
|
|
|
'import/prefer-default-export': 'off',
|
|
|
|
'node/no-missing-import': 'off',
|
|
|
|
// to be cleaned up (should be left on and fixed but out of scope right now because it affects many files throughout the codebase)
|
|
|
|
'@typescript-eslint/no-use-before-define': 'warn',
|
|
|
|
'@typescript-eslint/brace-style': 'off', // TODO: fix conflict with prettier/prettier in data-transfer/engine/index.ts
|
2022-11-17 21:19:33 +01:00
|
|
|
},
|
2022-11-09 11:02:35 +01:00
|
|
|
};
|