Skip to content

Commit

Permalink
feat: Update extension rule config for n/no-missing-import
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmuslp committed May 31, 2024
1 parent 2e7af5b commit 922fcce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 12 additions & 1 deletion src/typescript-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ module.exports = {
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],

'n/no-missing-import': ['error', {
tryExtensions: ['.js', '.jsx', '.d.ts', '.ts', '.tsx']
tryExtensions: [
'.js',
'.ts',
'.mjs',
'.mts',
'.cjs',
'.cts',
'.json',
'.node',
'.jsx',
'.tsx'
]
}],
'react/jsx-indent': ['error', 'tab'],
'react/jsx-indent-props': ['error', 'tab']
Expand Down
3 changes: 0 additions & 3 deletions src/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ module.exports = {
'no-tabs': 'off',
'no-void': 'off',
'n/callback-return': 'error',
'n/no-missing-import': ['error', {
// tryExtensions: ['.js', '.d.ts', '.ts'] // https://github.com/eslint-community/eslint-plugin-n/issues/33
}],
'n/no-unsupported-features/es-syntax': ['error', {
ignores: [
'modules'
Expand Down

0 comments on commit 922fcce

Please sign in to comment.