-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add .coafile and Travis lint job #59
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[all] | ||
ignore = node_modules/**, dist/**, .git/** | ||
use_spaces = true | ||
|
||
[all.SpaceConsistencyBear] | ||
files = **.js, **.json, **.yml, **.yaml, **.md | ||
bears = SpaceConsistencyBear | ||
# gantt-chart.js contains mixture of tabs and spaces | ||
ignore += src/gantt-chart.js | ||
|
||
[all.json] | ||
bears = JSONFormatBear | ||
files = **.json | ||
indent_size = 2 | ||
|
||
[all.js] | ||
bears = ESLintBear | ||
eslint_config = .eslintrc | ||
files = **.js | ||
ignore += src/gantt-chart.js | ||
|
||
[all.markdown] | ||
bears = MarkdownBear | ||
files = **.md | ||
|
||
[all.yaml] | ||
bears = YAMLLintBear | ||
files = **.yml, **.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,25 +5,50 @@ cache: | |
directories: | ||
- "node_modules" | ||
|
||
.disable_global: &disable_global | ||
node_js: false | ||
cache: false | ||
before_install: false | ||
install: false | ||
before_script: false | ||
script: false | ||
after_success: false | ||
before_deploy: false | ||
deploy: false | ||
|
||
# env forces jobs to be created from the top level settings | ||
env: | ||
jobs: | ||
include: | ||
- stage: moban | ||
- <<: *disable_global | ||
stage: moban | ||
language: python | ||
python: 3.6 | ||
cache: pip | ||
before_install: false | ||
install: pip install moban | ||
before_script: false | ||
script: .ci/check_moban.sh | ||
after_success: false | ||
|
||
- <<: *disable_global | ||
stage: lint | ||
language: python | ||
python: 3.6 | ||
cache: | ||
pip: true | ||
directories: | ||
- node_modules | ||
before_install: | ||
- export PATH=$PATH:./node_modules/.bin | ||
- export NODE_PATH=$NODE_PATH:./node_modules | ||
install: | ||
- pip install coala-bears | ||
- npm install | ||
script: coala --non-interactive -V | ||
|
||
# Needed for Firefox | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- sleep 3 # give xvfb some time to start | ||
- sleep 3 # give xvfb some time to start | ||
|
||
script: | ||
- npm run test | ||
|
@@ -42,5 +67,5 @@ deploy: | |
provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
on: | ||
"on": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I vaguely remember doing something like this in the past, but my quick searches couldn't come up with anything. What's the story behind this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is from the yaml lint bear. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess you did it in gci-leader? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup @andrewda did. coala/gci-leaders@dff8ba5 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha, I knew that was familiar 😂 |
||
branch: master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this is annoying ... as the rule is generally ok, but there are a bunch of exceptions which probably need to be added to get it working. (help ...?)
An alternative is to not ugprade eslint to 4.19. I chose that version because it is the same as being used on git-task-list, and IMO we should aim at having the same in our JS repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Airbnb style actually uses 4.9 as peer dependency. I really want to downgrade to that matching version :( too. Waiting for @blazeu .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was using 4.19 as i though, later is better. (it was before adding airbnbstyleguide)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it doesnt @bekicot.
It uses
eslint: '^4.9.0'
, which in case you didnt know means any version of 4, after that.To check what a JS semvar spec means, https://semver.npmjs.com/ is very helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.9 seems to work fine and no additional overhead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it would work with 4.19 with no dependency error. But it add additional overhead.