Skip to content

Commit

Permalink
Remove eslint-config-react-app
Browse files Browse the repository at this point in the history
It is no longer supported by a maintainer.
Fixes #3966
  • Loading branch information
jcoyne committed Oct 30, 2024
1 parent 0744dbc commit 683339c
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
34 changes: 32 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"env": {
"jest/globals": true
"jest/globals": true,
},
"extends": ["airbnb","react-app", "plugin:jest-dom/recommended", "plugin:testing-library/react"],
"parser": '@babel/eslint-parser',
"parserOptions": {
sourceType: 'module',
},
"extends": ["airbnb","plugin:react/recommended", "plugin:jest-dom/recommended", "plugin:testing-library/react"],
"globals": {
"page": true,
"document": true
Expand All @@ -14,6 +18,32 @@
],
"import/prefer-default-export": "off",
"no-console": "off",
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
'no-undef': 'off',
'no-restricted-syntax': ['warn', 'WithStatement'],
'no-restricted-globals': ['error'],
eqeqeq: ['warn', 'smart'],
'no-use-before-define': [
'warn',
{
functions: false,
classes: false,
variables: false,
},
],
'no-mixed-operators': [
'warn',
{
groups: [
['&', '|', '^', '~', '<<', '>>', '>>>'],
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||'],
['in', 'instanceof'],
],
allowSamePrecedence: false,
},
],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"require-jsdoc": ["error", {
"require": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"devDependencies": {
"@babel/cli": "^7.22.10",
"@babel/core": "^7.22.10",
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-transform-regenerator": "^7.22.10",
"@babel/plugin-transform-runtime": "^7.22.10",
"@babel/preset-env": "^7.22.10",
Expand All @@ -104,7 +105,6 @@
"core-js": "^3.21.1",
"eslint": "^8.11.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^27.1.5",
Expand Down
2 changes: 2 additions & 0 deletions src/components/PluginHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ export const PluginHook = forwardRef((props, ref) => {
))
) : null;
});

PluginHook.displayName = 'PluginHook';
1 change: 1 addition & 0 deletions src/containers/WorkspaceAddButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function useWidth() {
);
}

/* eslint react/display-name: "off" */
/**
* withWidth
* @memberof WorkspaceControlPanel
Expand Down
1 change: 1 addition & 0 deletions src/extend/withRef.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const withRef = () => (Component) => {
const WithRefs = forwardRef((props, ref) => (
<Component innerRef={ref} {...props} />
));
WithRefs.displayName = 'WithRefs';
return WithRefs;
};
2 changes: 1 addition & 1 deletion src/lib/CanvasWorld.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class CanvasWorld {
let canvasHeight = 0;
let canvasWidth = 0;

if (!isNaN(canvas.aspectRatio)) {
if (!Number.isNaN(canvas.aspectRatio)) {
if (dirY === 0) {
// constant height
canvasHeight = scale;
Expand Down

0 comments on commit 683339c

Please sign in to comment.