@qlik/eslint-config

0.7.23 • Public • Published

@qlik/eslint-config

Qlik's ESlint config for pure javascript/typescript environments. Based on airbnb-base/prettier config with some modifications.

usage

These configs assumes that you are using typescript. It is still possible to write .js files and get linting on those.

Simplest approach is to add one of the following field in package.json:

For a pure environment with no specific frameworks use:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config"
  ]
},

Using react:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config/react"
  ]
},

Using svelte:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config/svelte"
  ]
},

Using react AND svelte (rare occasion):

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config/react-svelte"
  ]
},

For a node environment with commonjs modules use:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config/node"
  ]
},

For a node environment with ES modules use:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "@qlik/eslint-config/esm"
  ]
},

Additional configs that can be used in conjunction with the above:

"eslintConfig": {
  "root": true,
  "parserOptions": {
    "project": "path/to/tsconfig.json"
  },
  "extends": [
    "...",
    "@qlik/eslint-config/vitest", // adds linting on vitest test and config files
    // AND/OR
    "@qlik/eslint-config/playwright" // adds linting on playwright test and config files
  ]
},

Readme

Keywords

none

Package Sidebar

Install

npm i @qlik/eslint-config

Weekly Downloads

4,671

Version

0.7.23

License

ISC

Unpacked Size

14.4 kB

Total Files

22

Last publish

Collaborators

  • nilzona_user
  • qlikossbuild
  • peol