packlint icon indicating copy to clipboard operation
packlint copied to clipboard

docs(README.md): edit example of configuration file

Open manudeli opened this issue 2 years ago • 0 comments

Edit README.md to remove chance of making mistake by beginners

I don't use Plug'n'play nodeLinker. so My monorepo:https://github.com/suspensive/react was having packages/*/node_modules.

AS-IS: current guide to config packlint

// packlint.config.mjs
```js
// packlint.config.mjs
export default {
  files: ['./packages/**/package.json'],
  ignores: ['./package.json'],
  rules: {
    merge: {  
      type: 'module',
      scripts: {
        prepack: 'yarn build',
        build: 'rm -rf dist && tsup ./src/index.ts --format esm --dts',
        dev: 'yarn run build --watch',
        typecheck: 'tsc --noEmit',
      },
      publishConfig: {
        access: 'public',
      },
    },
  },
};

but when I use packlint.config.mjs following as README.md's configuration guide, I met error like below picture.

image

actually It's not really problem. because I fixed it after edit configuration file like this Pull Request's file changed. but many package don't use Plug'n'Play yet, so I don't want to let leave obstacle for packlint beginner anymore. It's why I make this Pull Request.

Other context

Actually I think this Pull Request is not perfect solution. so I want to suggest other way to solve this problem:making packlint can ignore packages//node_modules defaultly, not configuration. I guess that packages//node_modules is not goal of packlint.

manudeli avatar Feb 08 '23 10:02 manudeli