Examples
Real-world configuration examples for common project setups.
Node.js backend
Section titled “Node.js backend”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: ["lints-js", "lints-jsdoc", "node", "cjs-override"], })]React frontend
Section titled “React frontend”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: ["lints-js", "react"], options: { "lints-js": { files: ["src/**/*.{js,jsx}"], }, react: { files: ["src/**/*.{js,jsx}"], }, }, })]Tauri desktop app
Section titled “Tauri desktop app”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: ["lints-js", "tauri"], options: { "lints-js": { files: ["src/**/*.{js,jsx,ts,tsx}"], }, }, })]VS Code extension
Section titled “VS Code extension”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: ["lints-js", "lints-jsdoc", "node", "vscode-extension"], })]Monorepo with mixed module types
Section titled “Monorepo with mixed module types”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: [ "lints-js", "lints-jsdoc", "node", "cjs-override", "mjs-override", ], options: { "lints-js": { files: ["packages/*/src/**/*.js"], indent: 4, maxLen: 120, }, node: { files: ["packages/*/src/**/*.js"], }, }, })]Relaxed config for a hobby project
Section titled “Relaxed config for a hobby project”import uglify from "@gesslar/uglier"
export default [ ...uglify({ with: ["lints-js", "node"], options: { "lints-js": { maxLen: 200, overrides: { "no-console": "off", "no-unused-vars": "warn", }, }, }, })]