Skip to content

Commit

Permalink
Change Linter Config to disallow inline styles (#252)
Browse files Browse the repository at this point in the history
Inline styles are not great, this has the linter emit an error when you
use them.
  • Loading branch information
schreiaj authored Sep 26, 2024
1 parent 21d86a1 commit ff33af8
Show file tree
Hide file tree
Showing 3 changed files with 1,515 additions and 3 deletions.
3 changes: 3 additions & 0 deletions OCR/frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import react from 'eslint-plugin-react'
import tseslint from 'typescript-eslint'

export default tseslint.config({
Expand All @@ -15,12 +16,14 @@ export default tseslint.config({
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'react': react,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react/forbid-component-props': ['error', { forbid: ['style'] }],
},
})
Loading

0 comments on commit ff33af8

Please sign in to comment.