Skip to content

Commit

Permalink
fix(lint): add eslint as a pre task when bundling & fix linting errors (
Browse files Browse the repository at this point in the history
#246)

* fix(lint): add eslint as a pre task when bundling & fix linting errors
  • Loading branch information
ghiscoding authored Jan 27, 2021
1 parent 52cc702 commit 6f7ccd8
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
*.zip
*.spec.ts
**/__tests__/*.*
**/dist/*.*
**/dist/**/*.*
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@typescript-eslint"
],
"ignorePatterns": [
"**/dist/**/*.*",
"**/__tests__/*.ts"
],
"rules": {
Expand Down
4 changes: 2 additions & 2 deletions examples/webpack-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@slickgrid-universal/excel-export": "^0.9.0",
"@slickgrid-universal/text-export": "^0.9.0",
"@slickgrid-universal/vanilla-bundle": "^0.9.0",
"bulma": "^0.9.1",
"bulma": "^0.9.2",
"moment-mini": "^2.24.0",
"whatwg-fetch": "^3.5.0"
},
Expand All @@ -51,7 +51,7 @@
"ts-loader": "^8.0.14",
"ts-node": "^9.1.1",
"url-loader": "^4.1.1",
"webpack": "^5.16.0",
"webpack": "^5.18.0",
"webpack-cli": "^4.4.0",
"webpack-dev-server": "^3.11.2"
}
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"bootstrap": "lerna bootstrap --use-workspaces",
"prebundle": "npm run lint",
"bundle": "lerna run bundle --stream",
"prebundle:zip": "npm run bundle",
"bundle:zip": "lerna run bundle:zip --stream",
Expand Down Expand Up @@ -51,12 +52,12 @@
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "^14.14.22",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"cypress": "^6.3.0",
"eslint": "^7.18.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prefer-arrow": "^1.2.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"http-server": "^0.12.3",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/services/container.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
export interface ContainerInstance {
key: any;
instance: any;
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/services/pubSub.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { Subscription } from '../interfaces/index';

export abstract class PubSubService {
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/services/translater.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { PubSubService } from './pubSub.service';

export type TranslateServiceEventName = 'onLanguageChanged';
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"ts-loader": "^8.0.14",
"webpack": "^5.16.0"
"webpack": "^5.18.0"
}
}
115 changes: 60 additions & 55 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1573,11 +1573,16 @@
"@types/estree" "*"
"@types/json-schema" "*"

"@types/estree@*", "@types/estree@^0.0.45":
"@types/estree@*":
version "0.0.45"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884"
integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==

"@types/estree@^0.0.46":
version "0.0.46"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe"
integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==

"@types/[email protected]":
version "5.0.30"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51"
Expand Down Expand Up @@ -1817,75 +1822,75 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@^4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.0.tgz#92db8e7c357ed7d69632d6843ca70b71be3a721d"
integrity sha512-IJ5e2W7uFNfg4qh9eHkHRUCbgZ8VKtGwD07kannJvM5t/GU8P8+24NX8gi3Hf5jST5oWPY8kyV1s/WtfiZ4+Ww==
"@typescript-eslint/eslint-plugin@^4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.1.tgz#22dd301ce228aaab3416b14ead10b1db3e7d3180"
integrity sha512-5JriGbYhtqMS1kRcZTQxndz1lKMwwEXKbwZbkUZNnp6MJX0+OVXnG0kOlBZP4LUAxEyzu3cs+EXd/97MJXsGfw==
dependencies:
"@typescript-eslint/experimental-utils" "4.14.0"
"@typescript-eslint/scope-manager" "4.14.0"
"@typescript-eslint/experimental-utils" "4.14.1"
"@typescript-eslint/scope-manager" "4.14.1"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
lodash "^4.17.15"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/[email protected].0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.0.tgz#5aa7b006736634f588a69ee343ca959cd09988df"
integrity sha512-6i6eAoiPlXMKRbXzvoQD5Yn9L7k9ezzGRvzC/x1V3650rUk3c3AOjQyGYyF9BDxQQDK2ElmKOZRD0CbtdkMzQQ==
"@typescript-eslint/[email protected].1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.1.tgz#a5c945cb24dabb96747180e1cfc8487f8066f471"
integrity sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/scope-manager" "4.14.0"
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/typescript-estree" "4.14.0"
"@typescript-eslint/scope-manager" "4.14.1"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/typescript-estree" "4.14.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/parser@^4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.0.tgz#62d4cd2079d5c06683e9bfb200c758f292c4dee7"
integrity sha512-sUDeuCjBU+ZF3Lzw0hphTyScmDDJ5QVkyE21pRoBo8iDl7WBtVFS+WDN3blY1CH3SBt7EmYCw6wfmJjF0l/uYg==
"@typescript-eslint/parser@^4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.1.tgz#3bd6c24710cd557d8446625284bcc9c6d52817c6"
integrity sha512-mL3+gU18g9JPsHZuKMZ8Z0Ss9YP1S5xYZ7n68Z98GnPq02pYNQuRXL85b9GYhl6jpdvUc45Km7hAl71vybjUmw==
dependencies:
"@typescript-eslint/scope-manager" "4.14.0"
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/typescript-estree" "4.14.0"
"@typescript-eslint/scope-manager" "4.14.1"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/typescript-estree" "4.14.1"
debug "^4.1.1"

"@typescript-eslint/[email protected].0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.0.tgz#55a4743095d684e1f7b7180c4bac2a0a3727f517"
integrity sha512-/J+LlRMdbPh4RdL4hfP1eCwHN5bAhFAGOTsvE6SxsrM/47XQiPSgF5MDgLyp/i9kbZV9Lx80DW0OpPkzL+uf8Q==
"@typescript-eslint/[email protected].1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.1.tgz#8444534254c6f370e9aa974f035ced7fe713ce02"
integrity sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw==
dependencies:
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/visitor-keys" "4.14.0"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/visitor-keys" "4.14.1"

"@typescript-eslint/[email protected].0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6"
integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A==
"@typescript-eslint/[email protected].1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.1.tgz#b3d2eb91dafd0fd8b3fce7c61512ac66bd0364aa"
integrity sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w==

"@typescript-eslint/[email protected].0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz#4bcd67486e9acafc3d0c982b23a9ab8ac8911ed7"
integrity sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag==
"@typescript-eslint/[email protected].1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.1.tgz#20d3b8c8e3cdc8f764bdd5e5b0606dd83da6075b"
integrity sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ==
dependencies:
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/visitor-keys" "4.14.0"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/visitor-keys" "4.14.1"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/[email protected].0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54"
integrity sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA==
"@typescript-eslint/[email protected].1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.1.tgz#e93c2ff27f47ee477a929b970ca89d60a117da91"
integrity sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA==
dependencies:
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/types" "4.14.1"
eslint-visitor-keys "^2.0.0"

"@ungap/[email protected]":
Expand Down Expand Up @@ -2799,10 +2804,10 @@ builtins@^1.0.3:
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og=

bulma@^0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.9.1.tgz#2bf0e25062a22166db5c92e8c3dcb4605ab040d8"
integrity sha512-LSF69OumXg2HSKl2+rN0/OEXJy7WFEb681wtBlNS/ulJYR27J3rORHibdXZ6GVb/vyUzzYK/Arjyh56wjbFedA==
bulma@^0.9.2:
version "0.9.2"
resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.9.2.tgz#340011e119c605f19b8ca886bfea595f1deaf23c"
integrity sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A==

byline@^5.0.0:
version "5.0.0"
Expand Down Expand Up @@ -4527,10 +4532,10 @@ eslint-plugin-import@^2.22.1:
resolve "^1.17.0"
tsconfig-paths "^3.9.0"

eslint-plugin-prefer-arrow@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.2.tgz#0c6d25a6b94cb3e0110a23d129760af5860edb6e"
integrity sha512-C8YMhL+r8RMeMdYAw/rQtE6xNdMulj+zGWud/qIGnlmomiPRaLDGLMeskZ3alN6uMBojmooRimtdrXebLN4svQ==
eslint-plugin-prefer-arrow@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041"
integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==

eslint-scope@^5.0.0, eslint-scope@^5.1.1:
version "5.1.1"
Expand Down Expand Up @@ -11764,13 +11769,13 @@ webpack-sources@^2.1.1:
source-list-map "^2.0.1"
source-map "^0.6.1"

webpack@^5.16.0:
version "5.16.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.16.0.tgz#796e093c2d92c229f013aefefde82b50c0572570"
integrity sha512-QOkctcjYfEGxcYg4AzPJafyAQ7ANc266/URkX881uFA7b2k31E0Dmpy1ExfppHOTp1kHDTsRh9sXojVUvgPF0g==
webpack@^5.18.0:
version "5.18.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.18.0.tgz#bbcf13094aa0da0534d513f27d7ee72d74e499c6"
integrity sha512-RmiP/iy6ROvVe/S+u0TrvL/oOmvP+2+Bs8MWjvBwwY/j82Q51XJyDJ75m0QAGntL1Wx6B//Xc0+4VPP/hlNHmw==
dependencies:
"@types/eslint-scope" "^3.7.0"
"@types/estree" "^0.0.45"
"@types/estree" "^0.0.46"
"@webassemblyjs/ast" "1.11.0"
"@webassemblyjs/wasm-edit" "1.11.0"
"@webassemblyjs/wasm-parser" "1.11.0"
Expand Down

0 comments on commit 6f7ccd8

Please sign in to comment.