mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 07:47:41 +01:00
Cleanup tools (#1756)
* Use prettier own instead of eslint plugin * Extend prettier config angular eslint * Upgrade root prettier to 3 * Fix css syntax errors * Change eslint ignore to prettier ignore * Ignore formatting for outputs * Fix lint-staged error when edited multiple files * Bump pnpm version * Remove unnecessary pnpm config --------- Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
23
lint-staged.config.mjs
Normal file
23
lint-staged.config.mjs
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @param {string[]} filenames
|
||||
* @returns {string}
|
||||
*/
|
||||
const filenamesToAjvOption = (filenames) => filenames.map((filename) => `-d ${filename}`).join(' ');
|
||||
|
||||
/** @satisfies {import('lint-staged').Config} */
|
||||
const config = {
|
||||
'icons/*.svg': [
|
||||
'node ./scripts/optimizeStagedSvgs.mjs',
|
||||
'node ./scripts/generateNextJSAliases.mjs',
|
||||
],
|
||||
'icons/*.json': (filenames) => [
|
||||
`ajv --spec=draft2020 -s icon.schema.json ${filenamesToAjvOption(filenames)}`,
|
||||
`prettier --write ${filenames.join(' ')}`,
|
||||
],
|
||||
'categories/*.json': (filenames) => [
|
||||
`ajv --spec=draft2020 -s category.schema.json ${filenamesToAjvOption(filenames)}`,
|
||||
`prettier --write ${filenames.join(' ')}`,
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user