Skip to content

Instantly share code, notes, and snippets.

@ylastapis
Last active January 3, 2022 13:41
Show Gist options
  • Save ylastapis/9980cd2b85219c31942c6f6100f7e9c5 to your computer and use it in GitHub Desktop.
Save ylastapis/9980cd2b85219c31942c6f6100f7e9c5 to your computer and use it in GitHub Desktop.
React / TypeScript / Prettier / StyleLint Setup files
{
"extends": ["react-app", "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "react-hooks", "import"],
"env": {
"browser": true,
"jasmine": true,
"jest": true
},
"rules": {
"react/react-in-jsx-scope": "off",
"react/display-name": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/type-annotation-spacing": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-empty-interface": "off",
"prefer-const": "warn",
"no-extra-boolean-cast": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"ignorePatterns": ["config-overrides.js", "node_modules/", "scripts/*", "index.d.ts"]
}
{
"singleQuote": true,
"useTabs": false,
"tabWidth": 4,
"printWidth": 120,
"semi": true,
"bracketSpacing": true,
"jsxBracketSameLine": false
}
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4,
"max-empty-lines": 4,
"rule-empty-line-before": null,
"block-closing-brace-newline-after": null,
"block-opening-brace-newline-after": null,
"no-eol-whitespace": null,
"selector-type-no-unknown": null,
"no-missing-end-of-source-newline": null,
"number-leading-zero": null,
"at-rule-no-unknown": null,
"string-no-newline": null
}
}
{
"compilerOptions": {
"baseUrl": "./src",
"checkJs": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"outDir": "build/dist",
"sourceMap": true,
"strictNullChecks": true,
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"exclude": ["node_modules", "build", "scripts", "*.stories.*"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment