forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lintstagedrc.js
33 lines (33 loc) · 1.13 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
30
31
32
33
// .lintstagedrc.js
module.exports = {
'*.json': ['prettier --write'],
'*.md': ['prettier --write --prose-wrap always'],
'*.rake': [
'bundle exec rubocop --require rubocop-rspec --autocorrect --enable-pending-cops',
],
'*.scss': ['prettier --write'],
'*.svg': ['svgo --pretty'],
'*.{js,jsx}': [
'prettier --write',
'eslint --fix',
'jest --findRelatedTests --passWithNoTests',
],
'./Gemfile': [
'bundle exec rubocop --require rubocop-rspec --autocorrect --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 --autocorrect --enable-pending-cops',
],
// 'config/locales/*': () => 'bundle exec i18n-tasks normalize',
'scripts/{release,stage_release}': [
'bundle exec rubocop --require rubocop-rspec --autocorrect --enable-pending-cops',
],
'{app,spec,config,lib}/**/*.rb': [
'bundle exec rubocop --require rubocop-rspec --autocorrect --enable-pending-cops',
],
};