oursky / eslint-oursky Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I have trouble passing the lint test due to error when I nest a Text component inside another Text component:
<View>
...
<Text style={styles.footnoteText}>
{'*Only receipt scanning is available in the app.\n'}
{'For other document types, please '}
<Text style={styles.contactUsHyperlink} onPress={openURL}>
{'contact us'}
</Text>
{'.'}
</Text>
...
</View>
Error message:
error Raw text (*Only receipt scanning is available in the app.) cannot be used outside of a <Text> tag react-native/no-raw-text
As type-checking is done by TypeScript itself, eslint shouldn't have no-undef
rule for typescript files.
This will be an error as JSX
is a global.
function SomeComp(): JSX.Element {
// ...
}
The new JSX transform is now widely supported. The best practice is not to import React into scope. Turn off the rules to promote best practice.
consistent-return
requires default case even for exhaustive switch in TypeScript, undermining usefulness of @typescript-eslint/switch-exhaustiveness-check
.
Please add the following to .gitignore:
.DS_Store
*.pem
*.cer
*.cert
*.p12
*.pfx
*.key
.env
docker-compose.override.yml
refs 7eb91d1
I tried to upgrade to 2.31.0, but still the same error. refs: https://github.com/oursky/eslint-oursky/runs/645269495
@typescript-eslint/no-explicit-any
@typescript-eslint/no-unsafe-member-access
@typescript-eslint/no-unsafe-assignment
@typescript-eslint/no-unsafe-return
@typescript-eslint/no-unsafe-call
@typescript-eslint/strict-boolean-expressions
array-element-newline
no-mixed-operators
no-undefined
allowArgumentsExplicitlyTypedAsAny
of @typescript-eslint/explicit-module-boundary-types
I got these output when trying to use version 9.0.1:
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/modifier from id #
Config:
module.exports = {
root: true,
plugins: ['@oursky'],
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
},
extends: [
'plugin:@oursky/typescript',
],
};
Seems related to typescript-eslint/typescript-eslint#5525
For example
<IconButton type="button" title="Sign out" ariaLabel="Sign out" />
Prettier will remove parathesis so this rule will be violated.
With options
allowString: false
allowNumber: false
allowNullableObject: false
allowNullableBoolean: false
allowNullableString: false
allowNullableNumber: false
allowNullableEnum: false
allowAny: false
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false
Feel free to let your comments below
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.