Skip to content

Commit

Permalink
fix: fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafaRoosta74 committed Sep 20, 2022
1 parent 662b94b commit 2e5011b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 102 deletions.
93 changes: 1 addition & 92 deletions packages/website/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,94 +1,3 @@
{
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:prettier/recommended",
"plugin:sonarjs/recommended"
],
"plugins": ["prettier", "sonarjs"],
"parserOptions": {
"project": "./tsconfig.json"
},
"ignorePatterns": [
"build/",
"dist/",
"node_modules/",
".snapshots/",
"*.min.js",
"vite.config.ts"
],
"env": {
// Your environments (which contains several predefined global variables)
//
// browser: true,
// node: true,
// mocha: true,
// jest: true,
// jquery: true
},
"globals": {
// Your global variables (setting to false means it's not allowed to be reassigned)
//
// myGlobal: false
},
"rules": {
// SonarLint
"sonarjs/no-duplicate-string": "warn",
// Customize your rules
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off",
"react/function-component-definition": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-fragments": "off",
"react/jsx-no-useless-fragment": "off",
"react/require-default-props": "off",
"react/prop-types": "off",
"no-unused-vars": "off",
"jsx-a11y/anchor-is-valid": "warn",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/no-autofocus": "off",
"no-restricted-exports": "off",
"no-restricted-imports": ["error"],
"no-console": "warn",
"import/no-anonymous-default-export": "off",
"prettier/prettier": ["warn"],
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins
"no-prototype-builtins": "off",
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
"import/prefer-default-export": "off",
// Too restrictive: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
"react/destructuring-assignment": "off",
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904
"react/jsx-filename-extension": "off",
// Use function hoisting to improve code readability
"no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"ignoreRestSiblings": false
}
],
// Allow most functions to rely on type inference. If the function is exported, then `@typescript-eslint/explicit-module-boundary-types` will ensure it's typed.
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true,
"typedefs": true
}
],
// It's not accurate in the monorepo style
"import/no-extraneous-dependencies": "off"
}
"extends": "next/core-web-vitals"
}
11 changes: 1 addition & 10 deletions packages/website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "0.1.0",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -25,16 +25,7 @@
"@types/react": "18.0.18",
"@types/react-dom": "18.0.6",
"eslint": "8.23.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "16.1.0",
"eslint-config-next": "12.2.5",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-sonarjs": "0.13.0",
"typescript": "4.8.2"
},
"gitHead": "4bfdc7d937f5ba0937114d15c46e909b6d784e1d"
Expand Down

2 comments on commit 2e5011b

@vercel
Copy link

@vercel vercel bot commented on 2e5011b Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 2e5011b Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

formalite-story – ./packages/formalite

formalite-story.vercel.app
formalite-story-git-main-novin-develop.vercel.app
formalite-story-novin-develop.vercel.app

Please sign in to comment.