Skip to content

Commit

Permalink
Add eslint tree shaking plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
John Riordan committed May 11, 2020
1 parent afaf73b commit 473bbc3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"sourceType": "module",
"project": "./tsconfig-base.json"
},
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint", "tree-shaking"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand All @@ -18,6 +16,16 @@
],
"rules": {
"no-console": "error",
"@typescript-eslint/member-ordering": "error"
}
// "@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/member-ordering": "error",
"tree-shaking/no-side-effects-in-initialization": 2
},
"overrides": [
{
"files": ["./demo/**/*.ts", "./test/**/*.ts"],
"rules": {
"tree-shaking/no-side-effects-in-initialization": "off"
}
}
]
}
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-tree-shaking": "^1.8.0",
"jasmine-core": "^3.5.0",
"karma": "^5.0.5",
"karma-chrome-launcher": "^3.1.0",
Expand Down

0 comments on commit 473bbc3

Please sign in to comment.