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

[core] Lint with typescript-eslint parser #21758

Merged
merged 16 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from 15 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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
/packages/material-ui-icons/legacy
/packages/material-ui-icons/src
/packages/material-ui-icons/templateSvgIcon.js
# TODO
/packages/typescript-to-proptypes/
/framer/
# Ignore fixtures
/packages/typescript-to-proptypes/test/**/*.js
/tmp
Expand Down
143 changes: 82 additions & 61 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const confusingBrowserGlobals = require('confusing-browser-globals');
const path = require('path');

module.exports = {
Expand All @@ -11,13 +10,19 @@ module.exports = {
browser: true,
node: true,
},
extends: ['plugin:import/recommended', 'airbnb', 'prettier', 'prettier/react'],
parser: 'babel-eslint',
extends: [
'plugin:import/recommended',
'plugin:import/typescript',
'airbnb-typescript',
Copy link
Member

Choose a reason for hiding this comment

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

What the motivation of usage predefined config? Why not to use recommended by @tpescript-eslint?

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 13, 2020

Choose a reason for hiding this comment

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

One of the end goal is to avoid developers or have to format the code once they copy and paste it from the demos. So the question we should answer to is: what's more popular in the community? Also, we have to consider that the stricter rules also cover lesser rules, meaning we can cover more developers by being more strict than the average.

The second goal is to make us more productive.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 13, 2020

Choose a reason for hiding this comment

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

Note that we were already using the Airbnb configuration. My objective was to lint TypeScript minimizing the diff. If we want to change the rules, that would be best in a different pull request.

Copy link
Member

Choose a reason for hiding this comment

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

We can discuss the preset in another issue. This PR should be limited to switching the parser and adding TS files.

'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['babel', 'material-ui', 'react-hooks'],
plugins: ['material-ui', 'react-hooks', '@typescript-eslint'],
settings: {
'import/resolver': {
webpack: {
Expand All @@ -31,16 +36,11 @@ module.exports = {
*/
rules: {
'consistent-this': ['error', 'self'],
'linebreak-style': 'off', // Doesn't play nicely with Windows
// just as bad as "max components per file"
'max-classes-per-file': 'off',
'no-alert': 'error',
// Strict, airbnb is using warn; allow warn and error for dev environments
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-constant-condition': 'error',
// Airbnb use error
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'no-alert': 'error', // Too much interruptive
'no-console': ['error', { allow: ['warn', 'error'] }], // Allow warn and error for production events
'no-param-reassign': 'off', // It's fine.
'no-restricted-imports': [
'error',
{
Expand All @@ -51,64 +51,38 @@ module.exports = {
],
},
],
'nonblock-statement-body-position': 'error',
// Airbnb restricts isNaN and isFinite which are necessary for IE 11
// we have to be disciplined about the usage and ensure the Number type for its
// arguments
'no-restricted-globals': ['error'].concat(confusingBrowserGlobals),
'no-constant-condition': 'error',
'no-prototype-builtins': 'off', // Use the proptype inheritance chain
Copy link
Member

Choose a reason for hiding this comment

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

Why was this rule turned off?

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 15, 2020

Choose a reason for hiding this comment

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

Do you agree with the rule? https://eslint.org/docs/rules/no-prototype-builtins. If we don't disable it, it fails in 5 places, for instance in the Modal

Capture d’écran 2020-07-15 à 16 22 09

We would need to fix it with the proposed approach to the eslint documentation. It seems to be about hedging against global prototype pollution. Is it necessary?

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather disable these on a per line basis. I do follow the rationale but this rule also documents very well when it should be turned of. We can't guarantee it globally though.

E.g. setTimeout.hasOwnProperty is safe because setTimeout is a JS global that does inherit. someObject.hasOwnProperty is unsafe if you don't know where the object is coming from. I'd say the rule flagging intent.hasOwnProperty is actually a good thing to guard against because it's executed on the server.

'no-underscore-dangle': 'error',
'nonblock-statement-body-position': 'error',
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-destructuring': 'off', // Destructuring harm grep potential.

'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': 'off', // deprecated
'jsx-a11y/no-autofocus': 'off', // We are a library, people do what they want.

'@typescript-eslint/dot-notation': 'off', // TODO performance consideration
'@typescript-eslint/no-implied-eval': 'off', // TODO performance consideration
'@typescript-eslint/no-throw-literal': 'off', // TODO performance consideration
'import/named': 'off', // Not sure why it doesn't work
'import/no-extraneous-dependencies': 'off', // Missing yarn workspace support
'jsx-a11y/label-has-associated-control': 'off', // doesn't work?
'jsx-a11y/no-autofocus': 'off', // We are a library, we need to support it too
'material-ui/docgen-ignore-before-comment': 'error',

// This rule is great for raising people awareness of what a key is and how it works.
'react/no-array-index-key': 'off',
'react/destructuring-assignment': 'off',
// It's buggy
'react/forbid-prop-types': 'off',
'react/jsx-curly-brace-presence': 'off',
// prefer <React.Fragment> over <>. The former allows `key` while the latter doesn't
'react/jsx-fragments': ['error', 'element'],
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], // airbnb is using .jsx
'react/jsx-handler-names': [
'error',
{
// airbnb is disabling this rule
eventHandlerPrefix: 'handle',
eventHandlerPropPrefix: 'on',
},
],
// not a good rule for components close to the DOM
'react/jsx-props-no-spreading': 'off',
'react-hooks/exhaustive-deps': ['error', { additionalHooks: 'useEnhancedEffect' }],
'react-hooks/rules-of-hooks': 'error',
'react/destructuring-assignment': 'off', // It's fine.
'react/forbid-prop-types': 'off', // Too strict, no time for that
'react/jsx-curly-brace-presence': 'off', // broken
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }], // airbnb is using .jsx
Copy link
Member

Choose a reason for hiding this comment

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

why no .jsx here?

Copy link
Member

Choose a reason for hiding this comment

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

If you don't care about restricting the file extensions that may contain JSX.

-- https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 16, 2020

Choose a reason for hiding this comment

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

.jsx isn't allowed, influenced by airbnb/javascript#985 (comment)

'react/jsx-fragments': ['error', 'element'], // Prefer <React.Fragment> over <>.
'react/jsx-props-no-spreading': 'off', // We are a UI library.
'react/no-array-index-key': 'off', // This rule is great for raising people awareness of what a key is and how it works.
'react/no-danger': 'error',
// Strict, airbnb is using off
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'off',
'react/no-multi-comp': 'off',
'react/require-default-props': 'off',
'react/no-find-dom-node': 'off', // Required for backward compatibility. TODO v5, drop
'react/require-default-props': 'off', // Not always relevant
'react/sort-prop-types': 'error',
// This depends entirely on what you're doing. There's no universal pattern
'react/state-in-constructor': 'off',
// stylistic opinion. For conditional assignment we want it outside, otherwise as static
'react/static-property-placement': 'off',

'import/no-extraneous-dependencies': 'off', // It would be better to enable this rule.
'import/namespace': ['error', { allowComputed: true }],
'import/order': [
'error',
{
groups: [['index', 'sibling', 'parent', 'internal', 'external', 'builtin']],
'newlines-between': 'never',
},
],

'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': ['error', { additionalHooks: 'useEnhancedEffect' }],
},
overrides: [
{
Expand All @@ -124,7 +98,6 @@ module.exports = {
rules: {
// does not work with wildcard imports. Mistakes will throw at runtime anyway
'import/named': 'off',
//
'no-restricted-imports': [
'error',
{
Expand Down Expand Up @@ -191,5 +164,53 @@ module.exports = {
'react/prop-types': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'import/export': 'off', // Not sure why it doesn't work
},
},
{
files: ['*.tsx'],
rules: {
'no-restricted-imports': [
Copy link
Member

Choose a reason for hiding this comment

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

This looks duplicated from the base rules.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 15, 2020

Choose a reason for hiding this comment

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

It allows an extra level of depth import compared to the base rule. It solves the Breakpoint problem I solved previously with duplicating the types in the demos (which I revered)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah but that isn't correct. We should only be testing public types. If we don't have a public type for breakpoints then this is a problem.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 15, 2020

Choose a reason for hiding this comment

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

Agree, we need to fix that missing public export

'error',
{
patterns: [
'@material-ui/*/*/*/*',
'!@material-ui/core/test-utils/*',
'!@material-ui/utils/macros/*.macro',
],
},
], // Allow deeper imports for TypeScript types. TODO?
'react/prop-types': 'off',
},
},
{
files: ['*.spec.tsx', '*.spec.ts'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-empty-pattern': 'off',
'no-lone-blocks': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'import/export': 'off', // Not sure why it doesn't work
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/tabindex-no-positive': 'off',
'react/default-props-match-prop-types': 'off',
'react/no-access-state-in-setstate': 'off',
'react/no-unused-prop-types': 'off',
'react/prefer-stateless-function': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
},
},
],
};
2 changes: 1 addition & 1 deletion docs/scripts/buildApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import * as babel from '@babel/core';
import traverse from '@babel/traverse';
import { mkdirSync, readFileSync, writeFileSync } from 'fs';
import { getLineFeed } from './helpers';
import { rewriteUrlForNextExport } from 'next/dist/next-server/lib/router/rewrite-url-for-export';
import path from 'path';
import kebabCase from 'lodash/kebabCase';
Expand All @@ -11,6 +10,7 @@ import { defaultHandlers, parse as docgenParse } from 'react-docgen';
import remark from 'remark';
import remarkVisit from 'unist-util-visit';
import * as yargs from 'yargs';
import { getLineFeed } from './helpers';
Copy link
Member

Choose a reason for hiding this comment

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

nit: revert this re-arrangment for proper git history.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 13, 2020

Choose a reason for hiding this comment

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

This is required for one of the rules of the Airbnb preset

Copy link
Member

Choose a reason for hiding this comment

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

Can we discuss introduction of new rules in another PR?

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 13, 2020

Choose a reason for hiding this comment

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

Are you against the rule or the diff itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you are against the rule, happy to discuss it and revert if needed.

If you are against the diff, I think that we will have to pay it at some time anyway, you & I already paid the cost now. I'm not sure it's worth spending time on reversing it.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 13, 2020

Choose a reason for hiding this comment

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

On this matter, we can also bring @dmtrKovalenko's rule to the table: https://github.com/dmtrKovalenko/eslint-plugin-pretty-imports. One ownside with it is that it requires to run eslint with the --fix option to get the order right. When working on the pickers, I couldn't figure out the sorting logic behind the scene. A second downside is that it requires to change the location of the import when changing the modules imported from a specific location.

Copy link
Member

Choose a reason for hiding this comment

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

I couldn't figure out the sorting logic behind the scene

What is the point of applying an order that is not reasonable to humans? I don't understand what ordering accomplishes here.

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 15, 2020

Choose a reason for hiding this comment

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

Regarding ordering import, I think that the current rule communicates the broadness of the dependencies. broadness as the number of dependents. The first dependency being the one with the highest number of dependents: React. But in practice, it only split into two groups: global and relative imports.

Why?
From my perspective it's about helping navigating the list, knowing it's sorted in a specific way.

Is it important?
I think that it's a net positive but at the end of the day, this alone won't make a difference.

Copy link
Member

@eps1lon eps1lon Jul 15, 2020

Choose a reason for hiding this comment

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

From my perspective it's about helping navigating the list, knowing it's sorted in a specific way.

I thought you didn't know how it is sorted?

Copy link
Member Author

@oliviertassinari oliviertassinari Jul 15, 2020

Choose a reason for hiding this comment

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

I'm advocating against eslint-plugin-pretty-imports (increase git diff, require running eslint --fix) but in favor of Airbnb default rule (enforce a split by global vs local imports, philosophy is to order by dependents).

import muiDefaultPropsHandler from '../src/modules/utils/defaultPropsHandler';
import generateMarkdown from '../src/modules/utils/generateMarkdown';
import { findPagesMarkdown, findComponents } from '../src/modules/utils/find';
Expand Down
3 changes: 2 additions & 1 deletion docs/src/modules/components/AppDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function renderNavItems(options) {
return (
<List>
{pages.reduce(
// eslint-disable-next-line no-use-before-define
// eslint-disable-next-line @typescript-eslint/no-use-before-define
(items, page) => reduceChildRoutes({ items, page, ...params }),
[],
)}
Expand Down Expand Up @@ -158,6 +158,7 @@ function AppDrawer(props) {
href={`https://material-ui.com${languagePrefix}/versions/`}
onClick={onClose}
>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels -- version string is untranslatable */}
{`v${process.env.LIB_VERSION}`}
</Link>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function AppFrame(props) {
hrefLang="en"
onClick={handleLanguageMenuClose}
>
{`${t('helpToTranslate')}`}
{t('helpToTranslate')}
</MenuItem>
</Menu>
</NoSsr>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/HighlightedCode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import * as PropTypes from 'prop-types';
import MarkdownElement from './MarkdownElement';
import prism from 'docs/src/modules/utils/prism';
import MarkdownElement from './MarkdownElement';

const HighlightedCode = React.forwardRef(function HighlightedCode(props, ref) {
const { code, language, ...other } = props;
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/TopLayoutBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function TopLayoutBlog(props) {
color="textSecondary"
className={classes.back}
>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'< Back to blog'}
</Link>
{rendered.map((chunk, index) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/generateMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { parse as parseDoctrine } from 'doctrine';
import * as recast from 'recast';
import { parse as docgenParse } from 'react-docgen';
import { rewriteUrlForNextExport } from 'next/dist/next-server/lib/router/rewrite-url-for-export';
import { pageToTitle } from './helpers';
import { SOURCE_CODE_ROOT_URL, LANGUAGES_IN_PROGRESS } from 'docs/src/modules/constants';
import { pageToTitle } from './helpers';

const PATH_REPLACE_REGEX = /\\/g;
const PATH_SEPARATOR = '/';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/getDemoConfig.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getDependencies } from './helpers';
import { CODE_VARIANTS } from 'docs/src/modules/constants';
import { getDependencies } from './helpers';

function jsDemo(demoData) {
return {
Expand Down
3 changes: 1 addition & 2 deletions docs/src/pages/components/autocomplete/CheckboxesTags.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-use-before-define */

/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import Checkbox from '@material-ui/core/Checkbox';
import TextField from '@material-ui/core/TextField';
Expand Down
3 changes: 1 addition & 2 deletions docs/src/pages/components/autocomplete/CheckboxesTags.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-use-before-define */

/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import Checkbox from '@material-ui/core/Checkbox';
import TextField from '@material-ui/core/TextField';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/ComboBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/ComboBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/CountrySelect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/CountrySelect.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/CustomizedHook.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import useAutocomplete from '@material-ui/lab/useAutocomplete';
import NoSsr from '@material-ui/core/NoSsr';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/CustomizedHook.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import useAutocomplete from '@material-ui/lab/useAutocomplete';
import NoSsr from '@material-ui/core/NoSsr';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/DisabledOptions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/DisabledOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete, {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/Filter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete, {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FixedTags.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import Chip from '@material-ui/core/Chip';
import TextField from '@material-ui/core/TextField';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FixedTags.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import Chip from '@material-ui/core/Chip';
import TextField from '@material-ui/core/TextField';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FreeSolo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FreeSolo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Dialog from '@material-ui/core/Dialog';
Expand Down
Loading