8000 Merge pull request #5941 from activeadmin/fix_rake_lint · ml/activeadmin@f69d58a · GitHub
[go: up one dir, main page]

Skip to content

Commit f69d58a

Browse files
authored
Merge pull request activeadmin#5941 from activeadmin/fix_rake_lint
Run `gherkin-lint` through `yarn`
2 parents e0ac14d + b7348b7 commit f69d58a

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"rollup-plugin-uglify": "^6.0.3"
3838
},
3939
"scripts": {
40-
"lint": "gherkin-lint features",
40+
"gherkin-lint": "gherkin-lint",
4141
"build": "rollup --config rollup.config.js",
4242
"prepublishOnly": "rm -rf src && cp -R app/javascript/active_admin src && cp -R app/assets/stylesheets/active_admin src/scss"
4343
},

tasks/lint.rake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class SassRailsLinter
106106
end
107107

108108
desc "Lints ActiveAdmin code base"
109-
task lint: ["lint:rubocop", "lint:mdl", "lint:gherkin_lint", "lint:trailing_blank_lines", "lint:missing_final_new_line", "lint:trailing_whitespace", "lint:fixme", "lint:sass_rails", "lint:rspec"]
109+
task lint: ["lint:rubocop", "lint:mdl", "lint:gherkin", "lint:trailing_blank_lines", "lint:missing_final_new_line", "lint:trailing_whitespace", "lint:fixme", "lint:sass_rails", "lint:rspec"]
110110

111111
namespace :lint do
112112
require "rubocop/rake_task"
@@ -120,11 +120,12 @@ namespace :lint do
120120
sh("mdl", "--git-recurse", ".")
121121
end
122122

123-
desc "Checks gherkin code style with gherkin-lint"
124-
task :gherkin_lint do
125-
puts "Running gherkin-lint..."
123+
desc "Checks gherkin code style"
124+
task :gherkin do
125+
puts "Linting gherkin code..."
126126

127-
sh("npx", "gherkin-lint")
127+
sh("bin/yarn", "install")
128+
sh("bin/yarn", "gherkin-lint")
128129
end
129130

130131
desc "Check for unnecessary trailing blank lines across all repo files"

yarn.lock

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,11 @@ core-js-compat@^3.1.1:
843843
browserslist "^4.6.6"
844844
semver "^6.3.0"
845845

846+
core-js@3.4.0:
847+
version "3.4.0"
848+
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.0.tgz#29ea478601789c72f2978e9bb98f43546f89d3aa"
849+
integrity sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA==
850+
846851
cross-spawn@^6.0.5:
847852
version "6.0.5"
848853
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@@ -1156,11 +1161,12 @@ functional-red-black-tree@^1.0.1:
11561161
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
11571162

11581163
gherkin-lint@^3.3.6:
1159-
version "3.3.6"
1160-
resolved "https://registry.yarnpkg.com/gherkin-lint/-/gherkin-lint-3.3.6.tgz#175c3be5826e9bc03a4f9df9befaed8d7bf6dcf4"
1161-
integrity sha512-dWClHBtbSwRnrn9o1Vuccl6+4zN6QGGxCPAPQ+vPy/82LBez9CQI4nMLA6EL6CrLwjBI/KxuaxSlQXPBCX5hQg==
1164+
version "3.3.10"
1165+
resolved "https://registry.yarnpkg.com/gherkin-lint/-/gherkin-lint-3.3.10.tgz#967e718951dc3ccd6762a278b5fa5c71d405d6b0"
1166+
integrity sha512-1RdG9lT7Ka47G6xwoAKdQIcoR/TXeuc7FwCZWfyHaT2vR7uDnGs+r+BW31kUpSPStCCk3iLH95/tT7qIC1QVYQ==
11621167
dependencies:
11631168
commander "2.18.0"
1169+
core-js "3.4.0"
11641170
gherkin "5.1.0"
11651171
glob "7.1.3"
11661172
lodash "4.17.14"

0 commit comments

Comments
 (0)
0