How to set up ESLint Airbnb for a NX Workspace

721 Views Asked by At

I'm having a bit of trouble understanding how I can set up ESLint Airbnb style for a NX Workspace for a Angular-Nest project.

NX generates the eslintrc.json but how can I go on ahead and configure it to Airbnb style.

This is what the NX Monorepo gives you. eslintrc.json:

{
  "root": true,
  "ignorePatterns": ["**/*"],
  "plugins": ["@nrwl/nx"],
  "overrides": [
    {
      "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
      "rules": {
        "@nrwl/nx/enforce-module-boundaries": [
          "error",
          {
            "enforceBuildableLibDependency": true,
            "allow": [],
            "depConstraints": [
              {
                "sourceTag": "*",
                "onlyDependOnLibsWithTags": ["*"]
              }
            ]
          }
        ]
      }
    },
    {
      "files": ["*.ts", "*.tsx"],
      "extends": ["plugin:@nrwl/nx/typescript"],
      "rules": {}
    },
    {
      "files": ["*.js", "*.jsx"],
      "extends": ["plugin:@nrwl/nx/javascript"],
      "rules": {}
    }
  ]
}
0

There are 0 best solutions below