@alergeek-ventures/eslint-config

9.0.25 • Public • Published

AV's ESLint configuration

  • our way of ensuring code consistency
  • no styling rules - use with prettier
  • available flavors 🍧:
    • vanilla (Javascript + imports)
    • typescript (uses @typescript-eslint suite)
    • react (react, JSX, hooks)
    • react-native (react, react-native, a11y)
    • tests (integration / unit tests via @testing-library and jest)
    • cypress (e2e tests)
    • cspell-eslint (spell checking)

how to use

# .eslintrc.js
module.exports = {
  env: {
    node: true,
    commonjs: true,
    jest: true,
  },
  extends: ["./vanilla.js", "./typescript.js", "./react.js", "./tests.js"],
  parser: "@typescript-eslint/parser",
  root: true,
  parserOptions: {
    /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */
    tsconfigRootDir: __dirname,
    project: ["./tsconfig.json"],
  },

  settings: {
    react: {
      version: "detect",
    },
  },
};

Cspell

Create .cspell.json file if you want to use spell checking

{
  "import": ["@alergeek-ventures/eslint-config/.cspell.json"],
  "dictionaries": ["customWords"],
  "dictionaryDefinitions": [
    { "name": "customWords", "path": "path/to/your/custom/dictionary" }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @alergeek-ventures/eslint-config

Weekly Downloads

470

Version

9.0.25

License

MIT

Unpacked Size

42.9 kB

Total Files

19

Last publish

Collaborators

  • kosciak