@schibstedsmb/eslint-config-schibstedsmb

0.2.0 • Public • Published
  1. Run npx install-peerdeps --dev @schibstedsmb/eslint-config-schibstedsmb

  2. Install ESLint plugin for VSCode

  3. Add these options to your VSCode settings:

    // This one is deprecated
    "eslint.autoFixOnSave": true,
    // Use this next one instead
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
    "[javascript]": {
      "editor.formatOnSave": false,
    },
    "[javascriptreact]": {
      "editor.formatOnSave": false
    },
    "[typescript]": {
      "editor.formatOnSave": false,
    },
    "prettier.disableLanguages": ["js", "ts"],
  4. Add .eslintrc to your project. ESLint has made it next to impossible to use shared configs/plugins globally, so sadly forced to using them locally. Put this in the file:

    {
      "extends": ["@schibstedsmb/eslint-config-schibstedsmb"],
      "rules": {
        // Put your overrides here
      }
    }
  5. Add a tsconfig.json file to your project and add your settings. Here is our standard settings:

    {
      "compilerOptions": {
        "target": "esnext",
        "lib": ["dom", "es2017"],
        "allowJs": true,
        "skipLibCheck": true,
        "esModuleInterop": true,
        "allowSyntheticDefaultImports": true,
        "strict": true,
        "forceConsistentCasingInFileNames": true,
        "module": "esnext",
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "isolatedModules": true,
        "noEmit": true,
        "jsx": "preserve",
        "sourceMap": true,
        "preserveConstEnums": true,
        "removeComments": false,
        "baseUrl": ".",
        "paths": {
          "~/*": ["./*"]
        }
      },
      "exclude": ["node_modules"],
      "include": []
    }

Readme

Keywords

none

Package Sidebar

Install

npm i @schibstedsmb/eslint-config-schibstedsmb

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

6.74 kB

Total Files

4

Last publish

Collaborators

  • jorgy93