Skip to content

Commit

Permalink
(ESLint) Enforce filename extensions for jsx (actualbudget#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
twk3 authored Dec 18, 2023
1 parent 516e7dc commit 7e3ace7
Show file tree
Hide file tree
Showing 70 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
'react-app',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: { project: [path.join(__dirname, './tsconfig.json')] },
Expand All @@ -63,6 +64,10 @@ module.exports = {
require('confusing-browser-globals').filter(g => g !== 'self'),
),

'react/jsx-filename-extension': [
'warn',
{ extensions: ['.jsx', '.tsx'], allow: 'as-needed' },
],
'react/jsx-no-useless-fragment': 'warn',
'react/self-closing-comp': 'warn',
'react/no-unstable-nested-components': [
Expand Down Expand Up @@ -282,9 +287,6 @@ module.exports = {
},
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2101.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [twk3]
---

Apply eslint filename extensions for jsx.

0 comments on commit 7e3ace7

Please sign in to comment.