Skip to content

Commit dca494e

Browse files
committed
feat: default to linting true in convert process
1 parent 49a829a commit dca494e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install ember2-coffeescript-conversion-toolkit -g
1717
e2cct [command]
1818
1919
Commands:
20-
e2cct convert [file] [optional: --lint] Decaffeinate and codemod a file
20+
e2cct convert [file] [optional: --nolint, --clean] Decaffeinate, codemod and lint a file
2121
e2cct lint [file] Lint and fix possible issues
2222
e2cct update Update e2cct to the latest version
2323
e2cct reset Caution: Reverts unstaged changes and
@@ -41,10 +41,11 @@ Options:
4141
7. legacy-getProperties-codemod: Converting this.getProperties to getProperties(this...
4242
8. ember-modules-codemod: Converting Ember.Component.extend({ to Component.extend({...
4343
9. ember-computed-getter-codemod: Converting computed(function() to computed({get()...
44+
10. eslint: Fixing possible issues... Pass 1
45+
11. eslint: Fixing possible issues... Pass 2
4446

4547
### Linting
46-
Linting can be done as part of the conversion process if passing in the optional `--lint` or `-l` alias with the convert command, eg `e2cct path/to/file.coffee --lint`.
47-
Alternatively is done separately as final step.
48+
Linting is done by default as part of the conversion process, if you would like to not lint you can pass in the optional `--nolint` flag, eg `e2cct path/to/file.coffee --nolint`.
4849
Rules are inherited from the project.
4950

5051
NOTE: With bigger files you might have to run the linting more than once, we automatically do 2 passes for convenience. In case you still see the message indicating potentially fixable issues with the '--fix' option after the conversion, you can manually run linting again using `e2cct lint`

commands/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = function(args) {
9595
}
9696
}
9797

98-
if (args.lint){
98+
if (!args.nolint){
9999
const lint = require('./lint')
100100
return lint(args)
101101
}

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ const pkg = require('./package.json')
66
const argv = yargs(hideBin(process.argv))
77
.version(pkg.version)
88
.alias('v', 'version')
9-
.command('convert [file] [optional: --lint]', 'Decaffeinate and codemod a file', (yargs) => {
9+
.command('convert [file] [optionals: --nolint, --clean]', 'Decaffeinate, codemod and lint a file', (yargs) => {
1010
yargs.positional('file', {
1111
describe: 'file to convert',
1212
default: null
13-
}).option('lint', {
14-
alias: 'l',
15-
describe: 'Lint file post convert'
13+
}).option('nolint', {
14+
describe: 'Dont lint file post convert'
1615
}).option('clean', {
1716
alias: 'c',
1817
describe: 'Remove .original.coffee files post convert'

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember2-coffeescript-conversion-toolkit",
3-
"version": "1.6.4",
3+
"version": "1.6.5",
44
"description": "ember2-coffeescript-conversion-toolkit - Tooling to assist in Ember upgrades, including coffeescript conversions",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)