@averay/codeformat 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,16 +12,34 @@ A very opinionated collection of configurations for a number of code formatting
12
12
  ln -s node_modules/@averay/codeformat/.editorconfig node_modules/@averay/codeformat/.prettierrc.json ./
13
13
  ```
14
14
 
15
- 3. Generate the ESLint configuration after any custom ignore definitions:
16
-
17
- ```js
18
- // eslint.config.js
19
- import { makeEslintConfig } from '@averay/codeformat';
20
-
21
- export default [
22
- {
23
- ignores: ['dist/**/*'],
24
- },
25
- ...makeEslintConfig({ tsconfigPath: './tsconfig.json' }),
26
- ];
27
- ```
15
+ 3. Import and call the relevant configuration builders for specific tools
16
+
17
+ ### ESLint
18
+
19
+ Create an `eslint.config.js` file and create the configuration:
20
+
21
+ ```js
22
+ // eslint.config.js
23
+ import { makeEslintConfig } from '@averay/codeformat';
24
+
25
+ export default [
26
+ {
27
+ ignores: ['dist/**/*'],
28
+ },
29
+ ...makeEslintConfig({ tsconfigPath: './tsconfig.json' }),
30
+ // Custom overrides can be added here
31
+ ];
32
+ ```
33
+
34
+ ### Stylelint
35
+
36
+ Create a `stylelint.config.cjs` file and create the configuration:
37
+
38
+ ```js
39
+ // stylelint.config.cjs
40
+ const { makeStylelintConfig } = require('@averay/codeformat');
41
+
42
+ module.exports = makeStylelintConfig();
43
+ ```
44
+
45
+ _(Stylelint does not currently support ESM so a `.cjs` file with CommonJS import & export syntax must be used)_