mirror of
https://github.com/funamitech/mastodon
synced 2024-11-27 14:29:03 +09:00
Improve lint-staged
config (#28704)
This commit is contained in:
parent
575ab085be
commit
923fc83190
@ -73,3 +73,5 @@ app/javascript/styles/mastodon/reset.scss
|
||||
|
||||
# Ignore the generated AUTHORS.md
|
||||
AUTHORS.md
|
||||
|
||||
!lint-staged.config.js
|
||||
|
11
lint-staged.config.js
Normal file
11
lint-staged.config.js
Normal file
@ -0,0 +1,11 @@
|
||||
const config = {
|
||||
'*': 'prettier --ignore-unknown --write',
|
||||
'Capfile|Gemfile|*.{rb,ruby,ru,rake}':
|
||||
'bundle exec rubocop --force-exclusion -a',
|
||||
'*.{js,jsx,ts,tsx}': 'eslint --fix',
|
||||
'*.{css,scss}': 'stylelint --fix',
|
||||
'*.haml': 'bundle exec haml-lint -a',
|
||||
'**/*.ts?(x)': () => 'tsc -p tsconfig.json --noEmit',
|
||||
};
|
||||
|
||||
module.exports = config;
|
@ -218,11 +218,5 @@
|
||||
"react-router-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "prettier --ignore-unknown --write",
|
||||
"Capfile|Gemfile|*.{rb,ruby,ru,rake}": "bundle exec rubocop --force-exclusion -a",
|
||||
"*.{js,jsx,ts,tsx}": "eslint --fix",
|
||||
"*.{css,scss}": "stylelint --fix"
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node ./index.js",
|
||||
"check:types": "tsc --noEmit"
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"noUnusedParameters": false,
|
||||
"tsBuildInfoFile": "../tmp/cache/streaming/tsconfig.tsbuildinfo",
|
||||
"paths": {}
|
||||
},
|
||||
"include": ["./*.js", "./.eslintrc.js"]
|
||||
|
@ -10,6 +10,8 @@
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": "./",
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "tmp/cache/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"mastodon": ["app/javascript/mastodon"],
|
||||
"mastodon/*": ["app/javascript/mastodon/*"]
|
||||
|
Loading…
Reference in New Issue
Block a user