Skip to content

Introduce tslint npm script task #1835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from

Conversation

catull
Copy link
Contributor

@catull catull commented Aug 25, 2016

Since tslint is a dev dependency, we might as well make use of it.

This PR introduces an npm script task names tslint.

Running it reveals a flood of rather trivial "typos".
I corrected most of them, they are included in this PR.

After applying this PR, the output of npm run tslint is 25 cases of camelcase/uppercase and one usage of evil eval (down from 147 cases):

(variable-name) addon/ng2/commands/doc.ts[4, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/generate.ts[9, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/get.ts[6, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/new.ts[8, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/new.ts[10, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/set.ts[6, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/commands/version.ts[5, 7]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/config/config.ts[18, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/config/config.ts[20, 31]: variable name must be in camelcase or uppercase
(no-eval) addon/ng2/models/find-lazy-modules.ts[49, 14]: forbidden eval
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[32, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[34, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[35, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[37, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[38, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[40, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[41, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[160, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[221, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[281, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/serializer.ts[27, 9]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/serializer.ts[40, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/serializer.ts[42, 23]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/serializer.ts[42, 50]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/tasks/build-webpack.ts[24, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/tasks/doc.ts[4, 7]: variable name must be in camelcase or uppercase

catull added 28 commits August 25, 2016 15:25
 (max-line-length) addon/ng2/commands/build.ts[20, 1]: Exceeds maximum line length of 100
(no-trailing-whitespace) addon/ng2/commands/build.ts[35, 8]: trailing whitespace
 (one-line) addon/ng2/commands/build.ts[29, 43]: missing whitespace
(whitespace) addon/ng2/commands/doc.ts[13, 41]: missing whitespace
(no-trailing-whitespace) addon/ng2/commands/doc.ts[15, 1]: trailing whitespace

(eofline) addon/ng2/commands/doc.ts[26, 29]: file should end with a newline

Left untouched

(variable-name) addon/ng2/commands/doc.ts[4, 7]: variable name must be in camelcase or uppercase
(no-trailing-whitespace) addon/ng2/commands/generate.ts[24, 1]: trailing whitespace
(no-trailing-whitespace) addon/ng2/commands/generate.ts[32, 1]: trailing whitespace
(no-trailing-whitespace) addon/ng2/commands/generate.ts[41, 1]: trailing whitespace

Left untouched

(variable-name) addon/ng2/commands/generate.ts[9, 7]: variable name must be in camelcase or uppercase
(max-line-length) addon/ng2/commands/github-pages-deploy.ts[21, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/github-pages-deploy.ts[218, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/github-pages-deploy.ts[228, 1]: Exceeds maximum line length of 100
(one-line) addon/ng2/commands/github-pages-deploy.ts[69, 36]: missing whitespace
(one-line) addon/ng2/commands/github-pages-deploy.ts[182, 37]: missing whitespace
(semicolon) addon/ng2/commands/github-pages-deploy.ts[168, 36]: Missing semicolon
(semicolon) addon/ng2/commands/github-pages-deploy.ts[186, 71]: Missing semicolon
(curly) addon/ng2/commands/github-pages-deploy.ts[140, 7]: if statements must be braced
(curly) addon/ng2/commands/github-pages-deploy.ts[191, 7]: if statements must be braced
(max-line-length) addon/ng2/commands/serve.ts[39, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[43, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[44, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[45, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[46, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[47, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/commands/serve.ts[75, 1]: Exceeds maximum line length of 100
(no-shadowed-variable) addon/ng2/commands/serve.ts[68, 14]: Shadowed variable: commandOptions
(one-line) addon/ng2/commands/serve.ts[55, 43]: missing whitespace
(typedef-whitespace) addon/ng2/custom-typings.d.ts[6, 25]: expected nospace before colon in index-signature
(no-unused-variable) addon/ng2/models/config.ts[8, 7]: Unused variable: schema
(no-inferrable-types) addon/ng2/models/config/config.ts[32, 23]: LHS type (string) inferred by RHS expression, remove type annotation
(no-shadowed-variable) addon/ng2/models/config/config.ts[76, 34]: Shadowed variable: content
(variable-name) addon/ng2/models/config/config.ts[18, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/config/config.ts[20, 31]: variable name must be in camelcase or uppercase
(no-inferrable-types) addon/ng2/models/config/config.ts[32, 23]: LHS type (string) inferred by RHS expression, remove type annotation
(no-inferrable-types) addon/ng2/models/config/config.ts[32, 23]: LHS type (string) inferred by RHS expression, remove type annotation
(no-shadowed-variable) addon/ng2/models/config/config.ts[76, 34]: Shadowed variable: content
(variable-name) addon/ng2/models/config/config.ts[18, 11]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/config/config.ts[20, 31]: variable name must be in camelcase or uppercase
(no-inferrable-types) addon/ng2/models/json-schema/schema-class-factory.ts[148, 25]: LHS type (string) inferred by RHS expression, remove type annotation
(one-line) addon/ng2/models/json-schema/schema-class-factory.ts[140, 25]: missing whitespace
(semicolon) addon/ng2/models/json-schema/schema-class-factory.ts[111, 22]: Missing semicolon
(typedef-whitespace) addon/ng2/models/json-schema/schema-tree.ts[78, 17]: expected nospace before colon in call-signature
(whitespace) addon/ng2/models/json-schema/schema-tree.ts[135, 11]: missing whitespace

Left untouched

(variable-name) addon/ng2/models/json-schema/schema-tree.ts[32, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[34, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[35, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[37, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[38, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[40, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[41, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[133, 9]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[160, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[221, 13]: variable name must be in camelcase or uppercase
(variable-name) addon/ng2/models/json-schema/schema-tree.ts[281, 11]: variable name must be in camelcase or uppercase
(no-unused-variable) addon/ng2/models/json-schema/serializer.ts[63, 11]: Unused method: _topIsArray
(max-line-length) addon/ng2/models/webpack-build-common.ts[66, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[67, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[68, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[71, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[72, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[73, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-common.ts[74, 1]: Exceeds maximum line length of 100
(no-trailing-whitespace) addon/ng2/models/webpack-build-common.ts[17, 16]: trailing whitespace
(quotemark) addon/ng2/models/webpack-build-common.ts[100, 59]: " should be '
(semicolon) addon/ng2/models/webpack-build-common.ts[127, 4]: Missing semicolon
(curly) addon/ng2/models/webpack-build-common.ts[22, 3]: if statements must be braced
(curly) addon/ng2/models/webpack-build-common.ts[23, 3]: if statements must be braced
'
(semicolon) addon/ng2/models/webpack-build-development.ts[1, 29]: Missing semicolon
(semicolon) addon/ng2/models/webpack-build-development.ts[27, 2]: Missing semicolon
(max-line-length) addon/ng2/models/webpack-build-mobile.ts[13, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-build-mobile.ts[14, 1]: Exceeds maximum line length of 100
(no-unused-variable) addon/ng2/models/webpack-build-mobile.ts[1, 13]: Unused import: webpack
(semicolon) addon/ng2/models/webpack-build-mobile.ts[22, 4]: Missing semicolon
(semicolon) addon/ng2/models/webpack-build-mobile.ts[33, 4]: Missing semicolon
(comment-format) addon/ng2/models/webpack-build-production.ts[22, 28]: comment must start with a space
(comment-format) addon/ng2/models/webpack-build-production.ts[23, 60]: comment must start with a space
(comment-format) addon/ng2/models/webpack-build-production.ts[24, 42]: comment must start with a space
(comment-format) addon/ng2/models/webpack-build-production.ts[25, 27]: comment must start with a space
(no-unused-variable) addon/ng2/models/webpack-build-production.ts[2, 13]: Unused import: webpackMerge
(semicolon) addon/ng2/models/webpack-build-production.ts[60, 4]: Missing semicolon
(semicolon) addon/ng2/models/webpack-build-utils.ts[5, 2]: Missing semicolon
(semicolon) addon/ng2/models/webpack-build-utils.ts[13, 2]: Missing semicolon
(semicolon) addon/ng2/models/webpack-build-utils.ts[23, 2]: Missing semicolon
(max-line-length) addon/ng2/models/webpack-config.ts[21, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-config.ts[32, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-config.ts[33, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-config.ts[34, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/models/webpack-config.ts[35, 1]: Exceeds maximum line length of 100
(one-line) addon/ng2/models/webpack-config.ts[31, 26]: missing whitespace
(quotemark) addon/ng2/models/webpack-config.ts[43, 12]: " should be '
(quotemark) addon/ng2/models/webpack-config.ts[46, 12]: " should be '
(max-line-length) addon/ng2/tasks/build-webpack-watch.ts[19, 1]: Exceeds maximum line length of 100
(quotemark) addon/ng2/tasks/build-webpack-watch.ts[37, 71]: " should be '
(semicolon) addon/ng2/tasks/build-webpack-watch.ts[40, 7]: Missing semicolon
(semicolon) addon/ng2/tasks/build-webpack-watch.ts[39, 9]: Missing semicolon
(curly) addon/ng2/tasks/build-webpack-watch.ts[31, 11]: if statements must be braced
(whitespace) addon/ng2/tasks/build-webpack-watch.ts[31, 13]: missing whitespace
(whitespace) addon/ng2/tasks/build-webpack-watch.ts[35, 11]: missing whitespace
(max-line-length) addon/ng2/tasks/build-webpack.ts[19, 1]: Exceeds maximum line length of 100
(no-trailing-whitespace) addon/ng2/tasks/build-webpack.ts[20, 1]: trailing whitespace

(quotemark) addon/ng2/tasks/build-webpack.ts[44, 71]: " should be '
(curly) addon/ng2/tasks/build-webpack.ts[38, 11]: if statements must be braced
(variable-name) addon/ng2/tasks/build-webpack.ts[23, 11]: variable name must be in camelcase or uppercase
(whitespace) addon/ng2/tasks/build-webpack.ts[35, 11]: missing whitespace
(whitespace) addon/ng2/tasks/build-webpack.ts[38, 13]: missing whitespace
(whitespace) addon/ng2/tasks/build-webpack.ts[42, 11]: missing whitespace
(max-line-length) addon/ng2/tasks/create-github-repo.ts[21, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/create-github-repo.ts[22, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/create-github-repo.ts[30, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/create-github-repo.ts[66, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/create-github-repo.ts[68, 1]: Exceeds maximum line length of 100
(quotemark) addon/ng2/tasks/create-github-repo.ts[21, 20]: " should be '
(quotemark) addon/ng2/tasks/create-github-repo.ts[24, 20]: " should be '
(semicolon) addon/ng2/tasks/create-github-repo.ts[66, 129]: Missing semicolon
(eofline) addon/ng2/tasks/doc.ts[11, 26]: file should end with a newline
(no-trailing-whitespace) addon/ng2/tasks/doc.ts[6, 85]: trailing whitespace
(max-line-length) addon/ng2/tasks/e2e.ts[12, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/serve-webpack.ts[20, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/serve-webpack.ts[24, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/serve-webpack.ts[44, 1]: Exceeds maximum line length of 100
(max-line-length) addon/ng2/tasks/serve-webpack.ts[51, 1]: Exceeds maximum line length of 100
(semicolon) addon/ng2/tasks/serve-webpack.ts[70, 7]: Missing semicolon
(curly) addon/ng2/tasks/serve-webpack.ts[59, 11]: if statements must be braced
(whitespace) addon/ng2/tasks/serve-webpack.ts[51, 24]: missing whitespace
(whitespace) addon/ng2/tasks/serve-webpack.ts[56, 11]: missing whitespace
(whitespace) addon/ng2/tasks/serve-webpack.ts[59, 13]: missing whitespace
(whitespace) addon/ng2/tasks/serve-webpack.ts[63, 11]: missing whitespace
(no-trailing-whitespace) addon/ng2/tasks/test.ts[13, 31]: trailing whitespace
(no-unused-variable) addon/ng2/tasks/test.ts[4, 10]: Unused import: 'getWebpackTestConfig'
(no-shadowed-variable) addon/ng2/utilities/get-dependent-files.ts[50, 13]: Shadowed variable: 'node'
(no-shadowed-variable) addon/ng2/utilities/get-dependent-files.ts[51, 11]: Shadowed variable: 'node'
(eofline) addon/ng2/utilities/prerender-webpack-plugin.ts[56, 2]: file should end with a newline
(semicolon) addon/ng2/utilities/prerender-webpack-plugin.ts[13, 33]: Missing semicolon
@hansl hansl closed this Aug 25, 2016
@hansl
Copy link
Contributor

hansl commented Aug 25, 2016

We already fixed those and already added tslint.

@catull catull deleted the introduce-tslint-npm-script-task branch August 25, 2016 19:48
@catull
Copy link
Contributor Author

catull commented Aug 25, 2016

Right, issue #1823 covered it.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants