mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Improve lint-staged
config (#28704)
This commit is contained in:
parent
575ab085be
commit
923fc83190
6 changed files with 17 additions and 7 deletions
|
@ -73,3 +73,5 @@ app/javascript/styles/mastodon/reset.scss
|
||||||
|
|
||||||
# Ignore the generated AUTHORS.md
|
# Ignore the generated AUTHORS.md
|
||||||
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": {
|
"react-router-dom": {
|
||||||
"optional": true
|
"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": {
|
"scripts": {
|
||||||
"start": "node ./index.js",
|
"start": "node ./index.js",
|
||||||
"check:types": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"module": "CommonJS",
|
"module": "CommonJS",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
|
"tsBuildInfoFile": "../tmp/cache/streaming/tsconfig.tsbuildinfo",
|
||||||
"paths": {}
|
"paths": {}
|
||||||
},
|
},
|
||||||
"include": ["./*.js", "./.eslintrc.js"]
|
"include": ["./*.js", "./.eslintrc.js"]
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
|
"incremental": true,
|
||||||
|
"tsBuildInfoFile": "tmp/cache/tsconfig.tsbuildinfo",
|
||||||
"paths": {
|
"paths": {
|
||||||
"mastodon": ["app/javascript/mastodon"],
|
"mastodon": ["app/javascript/mastodon"],
|
||||||
"mastodon/*": ["app/javascript/mastodon/*"]
|
"mastodon/*": ["app/javascript/mastodon/*"]
|
||||||
|
|
Loading…
Reference in a new issue