Create .lintstagedrc.js (#15209)
* Create .lintstagedrc * Run normalize * Revert "Run normalize" This reverts commit cc1271ae990635e282822018ea4ec2f58469d593. * Disable i18n-tasks and sort
This commit is contained in:
parent
f762acca86
commit
55ab81fb32
2 changed files with 29 additions and 41 deletions
29
.lintstagedrc.js
Normal file
29
.lintstagedrc.js
Normal file
|
|
@ -0,0 +1,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',
|
||||
],
|
||||
};
|
||||
41
package.json
41
package.json
|
|
@ -28,47 +28,6 @@
|
|||
"e2e": "bin/e2e",
|
||||
"e2e:creator-onboarding-seed": "yarn run e2e --creator-onboarding-seed"
|
||||
},
|
||||
"lint-staged": {
|
||||
"app/assets/config/manifest.js": [
|
||||
"prettier --write",
|
||||
"eslint --fix -c app/assets/javascripts/.eslintrc.js"
|
||||
],
|
||||
"*.{js,jsx}": [
|
||||
"prettier --write",
|
||||
"eslint --fix",
|
||||
"jest --findRelatedTests"
|
||||
],
|
||||
"{app,spec,config,lib}/**/*.rb": [
|
||||
"bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops"
|
||||
],
|
||||
"scripts/{release,stage_release}": [
|
||||
"bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops"
|
||||
],
|
||||
"app/views/**/*.jbuilder": [
|
||||
"bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops"
|
||||
],
|
||||
"./Gemfile": [
|
||||
"bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops"
|
||||
],
|
||||
"*.rake": [
|
||||
"bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops"
|
||||
],
|
||||
"app/**/*.html.erb": [
|
||||
"bundle exec erblint --autocorrect"
|
||||
],
|
||||
"*.json": [
|
||||
"prettier --write"
|
||||
],
|
||||
"*.scss": [
|
||||
"prettier --write"
|
||||
],
|
||||
"*.md": [
|
||||
"prettier --write --prose-wrap always"
|
||||
],
|
||||
"*.svg": [
|
||||
"svgo --pretty"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/thepracticaldev/dev.to.git"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue