forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.lintstagedrc.js
29 lines (29 loc) · 1.1 KB
/
.lintstagedrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// .lintstagedrc.js
module.exports = {
'*.json': ['prettier --write'],
'*.md': ['prettier --write --prose-wrap always'],
'*.rake': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
'*.scss': ['prettier --write'],
'*.svg': ['svgo --pretty'],
'*.{js,jsx}': ['prettier --write', 'eslint --fix', 'jest --findRelatedTests'],
'./Gemfile': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
'app/**/*.html.erb': ['bundle exec erblint --autocorrect'],
'app/assets/config/manifest.js': [
'prettier --write',
'eslint --fix -c app/assets/javascripts/.eslintrc.js',
],
'app/views/**/*.jbuilder': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
// 'config/locales/*': () => 'bundle exec i18n-tasks normalize',
'scripts/{release,stage_release}': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
'{app,spec,config,lib}/**/*.rb': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
};