eslint
module.exports = {
extends: ["next/core-web-vitals", "airbnb", "airbnb/hooks", "prettier"],
plugins: ["react", "@typescript-eslint", "prettier"],
env: {
browser: true,
es2021: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: "module",
},
rules: {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"no-param-reassign": "off",
"import/extensions": [
"error",
"ignorePackages",
{
ts: "never",
tsx: "never",
},
],
"consistent-return": "off",
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"react/jsx-filename-extension": "off",
"react/function-component-definition": [
"error",
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],
"prettier/prettier": "warn",
},
};
tsconfig
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"downlevelIteration": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
.babelrc
{
"presets": ["next/babel"],
"plugins": ["superjson-next"]
}