-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary <!-- Explain the motivation for this PR. Include "Fixes #<number>" if applicable. --> * Rules for whole repo: * '`@typescript-eslint/no-duplicate-type-constituents': 'error'` - means that types like `number|number` are not allowed * `eqeqeq: 'error' - you can't compare with `==`, use `===` instead * `'no-unreachable': 'error'` - no unreachable code, especially inside a function, after return statement. * Rules for examples in folder app: * `'react-native/no-unused-styles': 'error'`, * `'react-native/no-raw-text': 'off'`, - this rule is very convenient, but due to this bug [LINK](Intellicode/eslint-plugin-react-native#270) we can't use it with CI 😠 * `'no-inline-styles/no-inline-styles': 'error'` * `'react-native/no-inline-styles': 'off'`, (this rule does not allow variable styles with ternary operators, so I've used the one above) * `'react-native/no-single-element-style-arrays': 'error'`, * Create separate .eslintrc.js config for tests with separate rules * `'jest/no-disabled-tests': 'warn'`, * `'jest/no-focused-tests': 'error'`, * `'jest/no-identical-title': 'error'`, * `'jest/prefer-to-have-length': 'warn'`, * `'jest/valid-expect': 'error'`, ## Test plan <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. --> CI check pass ✅ --------- Co-authored-by: Aleksandra Cynk <aleksandracynk@swmansion.com> Co-authored-by: Tomasz Żelawski <40713406+tjzel@users.noreply.github.com>
- Loading branch information
1 parent
2149370
commit 68b92ee
Showing
54 changed files
with
877 additions
and
539 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
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,28 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'standard', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'plugin:import/typescript', | ||
], | ||
plugins: ['jest', 'react-native'], | ||
env: { | ||
'react-native/react-native': true, | ||
'jest/globals': true, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
'babel-module': { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'jest/no-disabled-tests': 'warn', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-identical-title': 'error', | ||
'jest/prefer-to-have-length': 'warn', | ||
'jest/valid-expect': 'error', | ||
}, | ||
}; |
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,8 +1,13 @@ | ||
module.exports = { | ||
root: true, | ||
extends: '@react-native', | ||
plugins: ['eslint-plugin-no-inline-styles'], | ||
rules: { | ||
'no-inline-styles/no-inline-styles': 'error', | ||
'react-native/no-inline-styles': 'off', | ||
'@typescript-eslint/no-shadow': 'off', | ||
'react-native/no-unused-styles': 'error', | ||
'react-native/no-raw-text': 'off', | ||
'react-native/no-single-element-style-arrays': 'error', | ||
}, | ||
}; |
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
Oops, something went wrong.