Skip to content

Instantly share code, notes, and snippets.

@Hi7cl4w
Last active February 7, 2024 17:18
Show Gist options
  • Select an option

  • Save Hi7cl4w/589b9bbef272f6772dd190b0773a1a79 to your computer and use it in GitHub Desktop.

Select an option

Save Hi7cl4w/589b9bbef272f6772dd190b0773a1a79 to your computer and use it in GitHub Desktop.

Revisions

  1. Hi7cl4w revised this gist Feb 7, 2024. 1 changed file with 63 additions and 0 deletions.
    63 changes: 63 additions & 0 deletions .eslintrc.cjs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    module.exports = {
    root: true,
    env: { browser: true, es2020: true },
    extends: [
    'eslint:recommended',
    'plugin:import/recommended',
    'plugin:import/typescript',
    'plugin:react/recommended',
    'plugin:jsx-a11y/recommended',
    'plugin:react-hooks/recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:@typescript-eslint/recommended-requiring-type-checking',
    'plugin:@tanstack/eslint-plugin-query/recommended',
    'prettier',
    ],
    ignorePatterns: ['dist', '.eslintrc.cjs'],
    parser: '@typescript-eslint/parser',
    parserOptions: {
    ecmaVersion: 2022,
    sourceType: 'module',
    project: './tsconfig.json',
    ecmaFeatures: {
    jsx: true,
    },
    },
    plugins: [
    'react-refresh',
    'react',
    'import',
    'jsx-a11y',
    '@typescript-eslint',
    '@tanstack/query',
    ],
    rules: {
    'react/prop-types': 0,
    'react/react-in-jsx-scope': 0,
    '@typescript-eslint/no-empty-function': 0,
    'react-refresh/only-export-components': [
    'warn',
    { allowConstantExport: true },
    ],
    '@tanstack/query/exhaustive-deps': 'error',
    '@tanstack/query/no-rest-destructuring': 'warn',
    '@tanstack/query/stable-query-client': 'error',
    },
    settings: {
    react: {
    version: 'detect',
    },
    'import/parsers': {
    '@typescript-eslint/parser': ['.ts', '.tsx'],
    },
    'import/resolver': {
    typescript: true,
    node: {
    extensions: ['.js', '.jsx', '.ts', '.tsx'],
    },
    alias: {
    map: [['', './public']],
    },
    },
    },
    }
  2. Hi7cl4w revised this gist Feb 13, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bash.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    npm i -D eslint eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks prettier eslint-plugin-import
    // typescript
    npm install -D eslint-import-resolver-typescript@3.5.1 @typescript-eslint/eslint-plugin@5.40.1 @typescript-eslint/parser@5.40.1
    npm install -D eslint-import-resolver-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
  3. Hi7cl4w revised this gist Feb 13, 2023. 1 changed file with 45 additions and 0 deletions.
    45 changes: 45 additions & 0 deletions .eslintrc.typescript.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    {
    "extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "plugin:react-hooks/recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "prettier"
    ],
    "rules": {
    "react/prop-types": 0,
    "react/react-in-jsx-scope": 0,
    "@typescript-eslint/no-empty-function": 0
    },
    "plugins": ["react", "import", "jsx-a11y", "@typescript-eslint"],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
    "ecmaVersion": 2022,
    "sourceType": "module",
    "project": "./tsconfig.json",
    "ecmaFeatures": {
    "jsx": true
    }
    },
    "env": {
    "es6": true,
    "browser": true,
    "node": true
    },
    "settings": {
    "react": {
    "version": "detect"
    },
    "import/parsers": {
    "@typescript-eslint/parser": [".ts", ".tsx"]
    },
    "import/resolver": {
    "typescript": {
    "alwaysTryTypes": true
    }
    }
    }
    }
  4. Hi7cl4w revised this gist Feb 13, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion bash.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    npm i -D eslint eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks prettier eslint-plugin-import
    npm i -D eslint eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks prettier eslint-plugin-import
    // typescript
    npm install -D [email protected] @typescript-eslint/[email protected] @typescript-eslint/[email protected]
  5. Hi7cl4w revised this gist Dec 3, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions bash.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    npm i -D eslint eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks prettier eslint-plugin-import
  6. Hi7cl4w revised this gist Nov 19, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions devDependencies.json
    Original file line number Diff line number Diff line change
    @@ -4,5 +4,6 @@
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-react": "^7.31.11",
    "eslint-plugin-react-hooks": "^4.6.0",
    "prettier": "^2.7.1",
    }
  7. Hi7cl4w revised this gist Nov 19, 2022. No changes.
  8. Hi7cl4w revised this gist Nov 19, 2022. No changes.
  9. Hi7cl4w revised this gist Nov 19, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .eslintrc.json
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@
    "plugin:import/errors",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "plugin:react-hooks/recommended",
    "prettier"
    ],
    "plugins": [
  10. Hi7cl4w created this gist Nov 19, 2022.
    45 changes: 45 additions & 0 deletions .eslintrc.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    {
    "extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "prettier"
    ],
    "plugins": [
    "react",
    "import",
    "jsx-a11y"
    ],
    "rules": {
    "react/prop-types": 0,
    "react/react-in-jsx-scope": 0
    },
    "parserOptions": {
    "ecmaVersion": 2022,
    "sourceType": "module",
    "ecmaFeatures": {
    "jsx": true
    }
    },
    "env": {
    "es6": true,
    "browser": true,
    "node": true
    },
    "settings": {
    "react": {
    "version": "detect"
    },
    "import/resolver": {
    "node": {
    "extensions": [
    ".js",
    ".jsx",
    ".ts",
    ".tsx"
    ]
    }
    }
    }
    }
    8 changes: 8 additions & 0 deletions devDependencies.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    {
    "eslint": "^8.28.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-react": "^7.31.11",
    "prettier": "^2.7.1",
    }