Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove nested eslint configs #3052

Merged
merged 1 commit into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
'prettier',
],

Expand Down Expand Up @@ -221,24 +222,13 @@ module.exports = {
'react/jsx-curly-brace-presence': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-handler-names': 'error',
'react/jsx-key': 'error',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'error',
'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-string-refs': 'error',
'react/no-unknown-property': 'error',
'react/prop-types': 0,
'react/prefer-es6-class': 'error',
'react/prefer-stateless-function': 'error',
'react/react-in-jsx-scope': 'error',
'react/self-closing-comp': 'error',
'react/display-name': 'warn',
Comment on lines -224 to -241
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed rules that were already defined in plugin:react/recommended and plugin:react/jsx-runtime configs

'react/jsx-no-useless-fragment': 'error',
'react/jsx-filename-extension': [
'error',
Expand Down
1 change: 0 additions & 1 deletion examples/graphiql-parcel/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { GraphiQL } from 'graphiql';

Expand Down
2 changes: 1 addition & 1 deletion examples/graphiql-parcel/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
"jsx": "react-jsx"
},
"include": ["src"]
}
3 changes: 0 additions & 3 deletions packages/graphiql-plugin-code-exporter/.eslintrc

This file was deleted.

3 changes: 0 additions & 3 deletions packages/graphiql-plugin-explorer/.eslintrc

This file was deleted.

3 changes: 0 additions & 3 deletions packages/graphiql-react/.eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion packages/graphiql/__mocks__/@graphiql/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useResponseEditor as _useResponseEditor,
useVariableEditor as _useVariableEditor,
} from '@graphiql/react';
import React, { useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';

export {
Argument,
Expand Down