Closed targos closed 1 year ago
@targos can i delete useless prettierignore file?
You have an example of such file?
yeah, you can remove that one.
also here https://github.com/mljs/hclust/pull/16 , https://github.com/mljs/decision-tree-cart/pull/22 we need prettier check/write in src and all prettierignore folders are not included
@targos cleanup done
There have been a lot of changes in how we structure and test our projects since the creation of this org. Here are some things that need to be cleaned up or changed, and a list of repositories where to do it.
To do
1. Rename some config files
If they exist:
.babelrc
->.babelrc.json
.prettierrc
->.prettierrc.json
2. Move Prettier config from
package.json
to.prettierrc.json
.There are some projects where the Prettier config is not in a separate file (example). Copy the config to a file named
.prettierrc.json
and remove the field from thepackage.json
.3. Rename
prepublishOnly
script toprepack
If it exists in
package.json
.4. Add
prettier
andprettier-write
scriptsIn
package.json
:The
"test"
script should be updated to callnpm run prettier
at the end.Example
5. Update dependencies
Be careful if there are breaking changes in non-dev dependencies. Check the changelog of the dependency and adapt the project if necessary.
6. Remove
eslint-plugin-*
from dependenciesAfter updating dependencies, we can do this because the
eslint-config-cheminfo
packages have the plugins as peer dependencies. Make sure to use the latest version of Node.js, otherwise it won't work.7. Refactor how tests are run
There are multiple things to do here. See floyd-warshall for an example of a correct setup.
test-coverage
npm script, remove it.testonly
npm script, rename it totest-only
.--coverage
to thetest-only
npm script. For example:"test-only": "jest --coverage"
"jest"
field with only"testEnvironment": "node"
in it, remove the field. The latest version of Jest defaults to this environment.jest.config.js
file.8. Rename
History.md
toCHANGELOG.md
# Changelog
+ a new line at the beginning.Example
9. Remove Travis config
README.md
10. Remove david config
Delete david-related lines from
README.md
Example
11. Remove
docs
folderIf it exists.
12. Setup or update GitHub workflows
.github/workflows/nodejs.yml
.github/workflows/release.yml
.github/workflows/documentationjs.yml
Only do this if there is no
typedoc.yml
workflow.