-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Eslint & Prettier setup (#72)
* Switch from npm to yarn v1 * Setup eslint & prettier * Format & fix Linting
- Loading branch information
Showing
61 changed files
with
9,916 additions
and
16,767 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,53 @@ | ||
require('@uniswap/eslint-config/load'); | ||
|
||
module.exports = { | ||
extends: ['@uniswap/eslint-config/react'], | ||
|
||
env: { | ||
'react-native/react-native': true, | ||
}, | ||
|
||
plugins: ['react', 'react-native', 'react-hooks'], | ||
|
||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'auto', | ||
}, | ||
], | ||
'no-empty': 'warn', | ||
'@typescript-eslint/no-empty-function': 'warn', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'react/function-component-definition': [ | ||
'error', | ||
{ | ||
unnamedComponents: ['function-expression', 'arrow-function'], | ||
namedComponents: ['function-declaration', 'arrow-function'], | ||
}, | ||
], | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/require-default-props': 'off', | ||
'react/jsx-filename-extension': [1, {extensions: ['.js', '.jsx', '.ts', '.tsx']}], | ||
'react/prop-types': 'off', | ||
'react/button-has-type': 'off', | ||
'react-native/no-raw-text': 'off', | ||
'react-native/no-single-element-style-arrays': 'error', | ||
'react/jsx-one-expression-per-line': 'off', | ||
|
||
// These configs should be enabled after the hackathon and we have time to fix all the issues | ||
'react-native/no-unused-styles': 'off', | ||
'react-native/no-inline-styles': 'off', | ||
'react-native/no-color-literals': 'off', | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: { | ||
'import/no-unused-modules': '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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* text eol=lf | ||
|
||
# Windows files should use crlf line endings other should use lf | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
*.bat text eol=crlf |
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,8 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 100, | ||
"bracketSameLine": false, | ||
"endOfLine": "lf" | ||
} |
Oops, something went wrong.