Skip to content
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

Enable to use frolint command in no git repository #17

Merged
merged 7 commits into from
Mar 19, 2019

Conversation

yamadayuki
Copy link
Collaborator

@yamadayuki yamadayuki commented Mar 19, 2019

WHY & WHAT

Under the previous implementation, we cannot use the frolint command without Git.
So we support --no-git option and --files option. And if you install frolint into non git project, frolint uses non git implementation. Result of sample directory is below:

# This project has no .git directory
~/dev/src/github.com/yamadayuki/sample
❯ git status
fatal: not a git repository (or any of the parent directories): .git

# Specify the file to analyze
~/dev/src/github.com/yamadayuki/sample
❯ yarn frolint -f ./index.js
yarn run v1.13.0
$ /Users/yamadayuki/dev/src/github.com/yamadayuki/sample/node_modules/.bin/frolint -f ./index.js
Detected 1 error, 0 warnings
./index.js: 1 error, 0 warnings found.
  ./index.js:1:7 'a' is assigned a value but never used. Allowed unused vars must match /^_/. (no-unused-vars)
✨  Done in 2.27s.

# All js / ts files
~/dev/src/github.com/yamadayuki/sample
❯ yarn frolint
yarn run v1.13.0
$ /Users/yamadayuki/dev/src/github.com/yamadayuki/sample/node_modules/.bin/frolint
Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
Detected 2 errors, 0 warnings
./test.js: 1 error, 0 warnings found.
  ./test.js:1:7 'b' is assigned a value but never used. Allowed unused vars must match /^_/. (no-unused-vars)
./index.js: 1 error, 0 warnings found.
  ./index.js:1:7 'a' is assigned a value but never used. Allowed unused vars must match /^_/. (no-unused-vars)
✨  Done in 2.27s.

@yamadayuki yamadayuki merged commit 761b47c into master Mar 19, 2019
@yamadayuki yamadayuki deleted the yamadayuki/no-git branch March 19, 2019 11:12
@yamadayuki yamadayuki added the enhancement New feature or request label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant