ESLint rules for TypeScript with TypeScript
MIT License
ESLint rules for TypeScript with TypeScript.
npm i -D eslint @tyankatsu0105/eslint-plugin
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
},
plugins: ["@tyankatsu0105"],
rules: {
"@tyankatsu0105/prefer-function-component-type": [
"error",
{ prefer: "React.FC" },
],
},
};
If you want to know about how to use scoped ESLint plugin, see: https://github.com/eslint/eslint/issues/9903
If you want to check eslint error, make files in the sandbox
dir.
# make files
npm run gen:sandbox
# run eslint for sandbox dir
npm run sandbox
See LICENSE