Skip to content

👀 eslint config for vampire project (react-ts based on xo)

License

Notifications You must be signed in to change notification settings

vampire-rip/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint config for vampire project(react-ts based on xo)

How to use

pnpm install -D @vampire-rip/eslint-config

then create .eslintrc at desired location with:

{
  "root": true,
  "extends": ["@vampire-rip"]
}

then create .prettierrc at desired location with:

{
  "$schema": "http://json.schemastore.org/prettierrc",
  "semi": true,
  "singleQuote": true,
  "arrowParens": "always",
  "trailingComma": "all",
  "tabWidth": 2,
  "useTabs": false,
  "printWidth": 120,
  "quoteProps": "as-needed",
  "jsxSingleQuote": false,
  "bracketSpacing": true,
  "endOfLine": "lf",
  "vueIndentScriptAndStyle": false
}

That's all.

FAQ

Overrides some existing rule

{
  "overrides": [
    {
      "files": ["**/*.{ts,tsx,mts,mtsx}"],
      // your rules here
      "rules": {}
    }
  ]
}

It complains about parserOptions.project has been set for ...

If add these files to tsconfig.json is not possible, create a new file tsconfig-eslint.json:

{
  "extends": "./tsconfig.json",
  // complaining files here:
  "include": [""]
}

change .eslintrc:

{
  "overrides": [
    {
      // complaining files here:
      "files": [""],
      "parserOptions": {
        "project": "./tsconfig-eslint.json"
      }
    }
  ]
}

Then it should be ok.

About

👀 eslint config for vampire project (react-ts based on xo)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published