@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 +31 -13
- package/dist/codeformat.cjs +788 -0
- package/dist/codeformat.cjs.map +1 -0
- package/dist/codeformat.mjs +747 -0
- package/dist/codeformat.mjs.map +1 -0
- package/eslint.config.js +7 -2
- package/package.json +26 -10
- package/stylelint.config.cjs +7 -0
- package/index.js +0 -71
- package/lib/convertWarnsToErrors.js +0 -11
- package/rulesets/ruleset-shared.js +0 -298
- package/rulesets/ruleset-typescript.js +0 -222
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.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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)_
|