Skip to content

Commit

Permalink
integrate prettier with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed Dec 14, 2024
1 parent 5343135 commit 0eff140
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 16 deletions.
96 changes: 90 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
}
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
"@size-limit/preset-small-lib": "^4.12.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/preact": "^3.2.4",
Expand All @@ -65,7 +66,6 @@
"prettier": "^3.4.2",
"rollup": "^2.79.2",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"size-limit": "^4.12.0",
"typescript": "^4.9.5"
Expand Down
18 changes: 9 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import copy from 'rollup-plugin-copy';
import { terser } from 'rollup-plugin-terser';
import terser from '@rollup/plugin-terser';
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';

Expand All @@ -9,12 +9,12 @@ export default [
external: ['preact', 'preact/hooks'],
plugins: [
typescript({
typescript: require('typescript')
typescript: require('typescript'),
}),
copy({
targets: [{ src: 'lib/package.json', dest: 'dist' }]
targets: [{ src: 'lib/package.json', dest: 'dist' }],
}),
terser()
terser(),
],
output: [
{
Expand All @@ -23,11 +23,11 @@ export default [
format: 'umd',
globals: {
preact: 'preact',
'preact/hooks': 'preact/hooks'
}
'preact/hooks': 'preact/hooks',
},
},
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
]
}
{ file: pkg.module, format: 'es' },
],
},
];

0 comments on commit 0eff140

Please sign in to comment.