mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
97f8d0f265
* Separate Prettier and ESLint according to best practices - Create standalone .prettierrc configuration file - Remove eslint-plugin-prettier integration from ESLint config - Replace with eslint-config-prettier to disable conflicting rules - Remove eslint-plugin-prettier dependency - Add dedicated format and format:check scripts - Update lint-staged to run Prettier and ESLint separately - Format entire codebase with new Prettier configuration This follows the recommended approach from Prettier documentation: https://prettier.io/docs/integrating-with-linters#notes * Remove test comment --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
14 lines
537 B
JavaScript
14 lines
537 B
JavaScript
export default {
|
|
// Run prettier first for formatting, then eslint for linting, and translation updates on changes to JS and
|
|
// TypeScript files
|
|
"**/*.[tj]s?(x)": [
|
|
(f) => `prettier --write ${f.join(" ")}`,
|
|
(f) => (f.length > 20 ? `yarn lint --fix` : `eslint ${f.join(" ")} --fix`),
|
|
() => `yarn build:i18n`,
|
|
() => "git add shared/i18n/locales/en_US/translation.json",
|
|
],
|
|
|
|
// Automatically de-duplicate packages as yarn is terrible at it
|
|
"(yarn.lock|package.json)": () => `yarn yarn-deduplicate yarn.lock`,
|
|
};
|