-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint): add eslint in addition to tslint (#75)
* feat(eslint): add eslint in addition to tslint integrate eslint with pf recommended rules update deps adjust test to be more useful dark theme for sidenav * [cleanup] add support for linting js files be more specific about which rules are disabled update readme
- Loading branch information
1 parent
5404142
commit b245fa4
Showing
15 changed files
with
1,507 additions
and
657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
// tells eslint to use the TypeScript parser | ||
"parser": "@typescript-eslint/parser", | ||
// tell the TypeScript parser that we want to use JSX syntax | ||
"parserOptions": { | ||
"tsx": true, | ||
"jsx": true, | ||
"js": true, | ||
"useJSXTextNode": true, | ||
"project": "./tsconfig.json", | ||
"tsconfigRootDir": "." | ||
}, | ||
// we want to use the recommended rules provided from the typescript plugin | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:patternfly-react/recommended" | ||
], | ||
// includes the typescript specific rules found here: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules | ||
"plugins": ["@typescript-eslint", "react-hooks", "eslint-plugin-react-hooks"], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"prettier/prettier": "off", | ||
"import/no-unresolved": "off", | ||
"import/extensions": "off", | ||
"react/prop-types": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import * as React from 'react'; | ||
import { PageSection, Title } from '@patternfly/react-core'; | ||
|
||
const Dashboard: React.FunctionComponent<any> = (props) => { | ||
return ( | ||
const Dashboard: React.FunctionComponent<{}> = () => ( | ||
<PageSection> | ||
<Title size="lg">Dashboard Page Title</Title> | ||
</PageSection> | ||
); | ||
} | ||
) | ||
|
||
export { Dashboard }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,8 @@ | |
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"**/*.jsx" | ||
"**/*.jsx", | ||
"**/*.js" | ||
], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.