lint: allow non-jsx file extensions

main
Cameron Clough 2022-01-09 23:00:37 +00:00
parent d8cec20a8e
commit 7b0ce6269c
2 changed files with 9 additions and 4 deletions

View File

@ -11,7 +11,7 @@
],
"rules": {
// disallow use of unary operators, ++ and --
// http://eslint.org/docs/rules/no-plusplus
// https://eslint.org/docs/rules/no-plusplus
// retropilot: we allow them in the for loop
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
@ -21,7 +21,7 @@
"no-continue": "off",
// disallow use of variables before they are defined
// http://eslint.org/docs/rules/no-use-before-define
// https://eslint.org/docs/rules/no-use-before-define
// retropilot: permit referencing functions before they're defined
"no-use-before-define": ["error", { "functions": false }],
@ -36,6 +36,11 @@
"ignoreTemplateLiterals": true
}],
// restrict file extensions that may contain JSX
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
// retropilot: we don't care about this
"react/jsx-filename-extension": "off",
// TODO: fix and remove
"no-console": "off"
}

View File

@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react';
import App from './App';
import React from 'react';
import { render } from '@testing-library/react';
test('renders learn react link', () => {
render(<p />);