-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,446 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
import {resolve, sep} from 'path'; | ||
import { resolve, sep } from 'path'; | ||
|
||
export default { | ||
'*.{js,mjs,cjs,ts,mts,cts,vue}': 'eslint --cache --fix', | ||
'*.{js,mjs,cjs,ts,tsx,mts,cts}': 'eslint --cache --fix', | ||
|
||
/** | ||
* Run typechecking if any type-sensitive files or project dependencies was changed | ||
* @param {string[]} filenames | ||
* @return {string[]} | ||
*/ | ||
'{package-lock.json,packages/**/{*.ts,*.vue,tsconfig.json}}': ({filenames}) => { | ||
'{package-lock.json,packages/**/{*.ts,*.tsx,tsconfig.json}}': ({ filenames }) => { | ||
// if dependencies was changed run type checking for all packages | ||
if (filenames.some(f => f.endsWith('package-lock.json'))) { | ||
return ['npm run typecheck --if-present']; | ||
} | ||
|
||
// else run type checking for staged packages | ||
const fileNameToPackageName = filename => | ||
filename.replace(resolve(process.cwd(), 'packages') + sep, '').split(sep)[0]; | ||
return [...new Set(filenames.map(fileNameToPackageName))].map( | ||
p => `npm run typecheck:${p} --if-present`, | ||
); | ||
const fileNameToPackageName = filename => filename.replace(resolve(process.cwd(), 'packages') + sep, '').split(sep)[0]; | ||
return [...new Set(filenames.map(fileNameToPackageName))].map(p => `npm run typecheck:${p} --if-present`); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
{ | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.css", "**/*.scss", "**/*.html"], | ||
"options": { | ||
"singleQuote": false | ||
} | ||
} | ||
], | ||
"printWidth": 140, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"bracketSpacing": false, | ||
"arrowParens": "avoid", | ||
"proseWrap": "never", | ||
"htmlWhitespaceSensitivity": "strict", | ||
"vueIndentScriptAndStyle": false, | ||
"endOfLine": "lf", | ||
"singleAttributePerLine": true | ||
"arrowParens": "avoid" | ||
} |
Oops, something went wrong.