## Description Make eslint rules stricter for packages #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [x] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
36 lines
916 B
JavaScript
36 lines
916 B
JavaScript
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
import commonjs from "@rollup/plugin-commonjs";
|
|
import typescript from "rollup-plugin-typescript2";
|
|
import generatePackageJson from "rollup-plugin-generate-package-json";
|
|
import packageJson from "./package.json";
|
|
|
|
export default {
|
|
// TODO: Figure out regex where each directory can be a separate module without having to manually add them
|
|
input: ["./index.ts"],
|
|
output: [
|
|
{
|
|
file: packageJson.module,
|
|
format: "esm",
|
|
sourcemap: true,
|
|
},
|
|
{
|
|
file: packageJson.main,
|
|
format: "cjs",
|
|
sourcemap: true,
|
|
},
|
|
],
|
|
plugins: [
|
|
peerDepsExternal(),
|
|
commonjs(),
|
|
typescript({ useTsconfigDeclarationDir: true }),
|
|
generatePackageJson({
|
|
baseContents: (pkg) => ({
|
|
...pkg,
|
|
main: "index.js",
|
|
module: "index.es.js",
|
|
types: "index.d.ts",
|
|
}),
|
|
}),
|
|
],
|
|
};
|