mirror of
https://github.com/teableio/teable
synced 2024-11-21 23:04:16 +00:00
0a5e32a038
* chore: change github url to teableio * chore: rename teable-group to teable * chore: rename url path to teableio
24 lines
859 B
JavaScript
24 lines
859 B
JavaScript
// @ts-check
|
|
|
|
/**
|
|
* This is the base lint-staged rules config and just includes prettier by default.
|
|
* A good practice is to override this base configuration in each package and/or application
|
|
* where we are able to add customization depending on the nature of the project (eslint...).
|
|
*
|
|
* {@link https://github.com/okonet/lint-staged#how-to-use-lint-staged-in-a-multi-package-monorepo}
|
|
* {@link https://github.com/teableio/teable/blob/main/docs/about-lint-staged.md}
|
|
*/
|
|
|
|
const { concatFilesForPrettier } = require('./lint-staged.common.js');
|
|
|
|
/**
|
|
* @type {Record<string, (filenames: string[]) => string | string[] | Promise<string | string[]>>}
|
|
*/
|
|
const rules = {
|
|
'**/*.{json,md,mdx,css,html,yml,yaml,scss,ts,js,tsx,jsx,mjs}': (filenames) => {
|
|
return [`prettier --write ${concatFilesForPrettier(filenames)}`];
|
|
},
|
|
};
|
|
|
|
module.exports = rules;
|