@amedia/prettier-config
Advanced tools
Comparing version 0.0.0-kragl-20220427162616 to 0.0.0-kragl-20220427163603
# @amedia/prettier-config | ||
## 0.0.0-kragl-20220427162616 | ||
## 0.0.0-kragl-20220427163603 | ||
@@ -51,50 +51,1 @@ ### Major Changes | ||
configuration as they should never collide due to duplication. | ||
## 0.0.0-20220427162516 | ||
### Major Changes | ||
- 5a4773f: Introduces the Kragl, a tool that makes it easy to use and comply with | ||
the Amedia code style and guidelines. | ||
Kragl provides commands like `lint` and `format`, which runs multiple | ||
tools with a single command, e.g. `lint` would run ESLint, Prettier, | ||
e.g. typechecks for TypeScript projects. | ||
Projects can use `kragl lint` with zero configuration and get the | ||
recommended rules by default (@amedia/prettier-config and | ||
@amedia/eslint-config) that attempts to identify the type of project | ||
(react/svelte/jest/typescript) and loads the relevant configuration. | ||
To get editor integration, projects should add at least two files: | ||
`.eslintrc.js`: | ||
module.exports = require('@amedia/kragl/config/eslint.config.cjs') | ||
`prettier.config.js`: | ||
module.exports = require('@amedia/kragl/config/prettier.config.cjs') | ||
To maximise effectiveness, the existing configurations have been changed | ||
to be more isolated in terms of scope (e.g. @amedia/eslint-config-react | ||
handles react rules only). This makes them easier to maintain, increases | ||
clarity about what rules go where, and generally makes them easier to | ||
reason about. | ||
This makes it a breaking change for consumers of those libraries. | ||
The pattern is to make it easier to do this: | ||
module.exports = { | ||
extends: [ | ||
'@amedia/eslint-config-base', | ||
'@amedia/eslint-config-react', | ||
'@amedia/eslint-config-jest', | ||
'@amedia/eslint-config-typescript', | ||
'prettier', | ||
], | ||
} | ||
And avoid problems where ESLint cannot uniquely reference a plugin or | ||
configuration as they should never collide due to duplication. |
{ | ||
"name": "@amedia/prettier-config", | ||
"version": "0.0.0-kragl-20220427162616", | ||
"version": "0.0.0-kragl-20220427163603", | ||
"description": "Prettier config for Amedia", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3094