diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-26 16:31:08 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-26 16:31:08 +0000 |
commit | dd5e46ab693910f41333109bc8dfd5488121b440 (patch) | |
tree | f5f9fb333696a09c78f915a02a1d5dd1ca09c312 /lib | |
parent | 5a4dabd0c9a58fbfc9ed103fa82bf84433756d27 (diff) | |
parent | 02f94cf038b08d25bc1b414a32d16f988fb9268e (diff) | |
download | gitlab-ce-dd5e46ab693910f41333109bc8dfd5488121b440.tar.gz |
Merge branch 'eslint' into 'master'
Add ESLint
## What does this MR do?
- create `package.json`
- add ESLint dependencies to `package.json`
- add JavaScript linting to CI
- add Rake task `lint:javascript`as alias for `eslint` (which itself is an alias for `npm run eslint`)
## Are there points in the code the reviewer needs to double check?
Probably not.
## Why was this MR needed?
My hovercraft was full of eels.
## What are the relevant issue numbers?
- https://gitlab.com/gitlab-org/gitlab-ce/issues/13224#note_12537431
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5006#note_13255658
See merge request !5445
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/eslint.rake | 7 | ||||
-rw-r--r-- | lib/tasks/lint.rake | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/eslint.rake b/lib/tasks/eslint.rake new file mode 100644 index 00000000000..d43cbad1909 --- /dev/null +++ b/lib/tasks/eslint.rake @@ -0,0 +1,7 @@ +unless Rails.env.production? + desc "GitLab | Run ESLint" + task :eslint do + system("npm", "run", "eslint") + end +end + diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake new file mode 100644 index 00000000000..32b668df3bf --- /dev/null +++ b/lib/tasks/lint.rake @@ -0,0 +1,9 @@ +unless Rails.env.production? + namespace :lint do + desc "GitLab | lint | Lint JavaScript files using ESLint" + task :javascript do + Rake::Task['eslint'].invoke + end + end +end + |