Comments (4)
As for react/prop-types
I think it is best left to the user to turn the rule off. Solving for all possible permutations of rulesets x languages x project technologies could quite quickly blow on us. 💣 🔥 The easiest way to silence that rule for TS files would be to use an overrides[]
stanza in .eslintrc.js and disable that rule for all .ts & .tsx files. 🤔
from code-quality-tools.
You can just specify which extensions are allowed for this rule at .eslintrc.json
config file.
{
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx"] }]
}
}
from code-quality-tools.
react/prop-types
is another that could be entirely turned off for typescript.
from code-quality-tools.
I'd even suggest to drop the react/jsx-filename-extension
rule completely. I vaguely recall a chat with someone from Frontend team that they do not want to use react components only in .jsx files but also in .js files. What matters most is how the project is compiled and not what extension is being used.
I'll drop the rule. Flow users would hit similar problem with their .flow
extensions and I bet there are other compile-to-js languages which use JSX syntax with other, exotic file extensions. 🤷♂️
from code-quality-tools.
Related Issues (20)
- Textlint Github Action HOT 1
- eslint-mdx
- Dependabot can't resolve your JavaScript dependency files
- Update commands in docs HOT 1
- [@strv/eslint-config-react] Replace babel-eslint with @babel/eslint-parser HOT 4
- no-restricted-globals
- Migration tutorial improvement HOT 2
- Upgrade to ESLint 8 HOT 1
- move away from Lerna HOT 1
- Migrate to flat config 🚨
- Migrate formatting rules 🚨
- Remove usage of stylelint-processor-styled-components
- Use correct rule for TypeScript HOT 1
- File and directory name linter HOT 1
- Secretlint
- Possible improvements [config-base] HOT 7
- Possible improvements [config-react] HOT 2
- Possible improvements [config-react-native] HOT 2
- Possible improvements [config-node] HOT 1
- Possible improvements [config-typescript] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-quality-tools.