@vfourny/node-toolkit 1.0.3 → 1.0.4

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
@@ -34,8 +34,8 @@ For `semantic-release` to work properly, certain environment variables must be d
34
34
 
35
35
  ## Configuration Files
36
36
 
37
- - `eslint.config.js`: ESLint configuration for JavaScript code linting.
38
- - `prettier.config.js`: Prettier configuration for JavaScript code formatting.
37
+ - `eslint.config.ts`: ESLint configuration for JavaScript code linting.
38
+ - `prettier.js`: Prettier configuration for JavaScript code formatting.
39
39
  - `tsconfig.json`: TypeScript configuration for transpiling TypeScript code.
40
40
  - `release.config.js`: Semantic Release configuration for version management.
41
41
  - `commitlintrc.js`: Commitlint configuration for commit message validation.
@@ -45,7 +45,7 @@ For `semantic-release` to work properly, certain environment variables must be d
45
45
  To import the ESLint configuration into your project, add the following code to your [ESLint](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file) configuration file:
46
46
 
47
47
  ```javascript
48
- import nodeToolkitEslintConfig from "@vfourny/node-toolkit/eslint"
48
+ import nodeToolkitEslintConfig from '@vfourny/node-toolkit/eslint'
49
49
 
50
50
  export default {
51
51
  ...nodeToolkitEslintConfig,
@@ -58,7 +58,7 @@ export default {
58
58
  To import the Prettier configuration into your project, add the following code to your [Prettier](https://prettier.io/docs/en/configuration.html) configuration file:
59
59
 
60
60
  ```javascript
61
- import nodeToolkitPrettierConfig from "@vfourny/node-toolkit/prettier"
61
+ import nodeToolkitPrettierConfig from '@vfourny/node-toolkit/prettier'
62
62
 
63
63
  export default {
64
64
  ...nodeToolkitPrettierConfig,
@@ -84,10 +84,10 @@ To import the TypeScript configuration into your project, add the following code
84
84
  To import the Semantic Release configuration into your project, add the following code to your [Semantic Release](https://semantic-release.gitbook.io/semantic-release) configuration file:
85
85
 
86
86
  ```javascript
87
- import nodeToolkitReleaseConfig from "@vfourny/node-toolkit/release"
87
+ import nodeToolkitReleaseConfig from '@vfourny/node-toolkit/release'
88
88
 
89
89
  export default {
90
- extends: "@vfourny/node-toolkit/release",
90
+ extends: '@vfourny/node-toolkit/release',
91
91
  // Your custom configurations
92
92
  }
93
93
  ```
@@ -98,7 +98,7 @@ To import the Commitlint configuration into your project, add the following code
98
98
 
99
99
  ```javascript
100
100
  export default {
101
- extends: "@vfourny/node-toolkit/commitlint",
101
+ extends: '@vfourny/node-toolkit/commitlint',
102
102
  }
103
103
  ```
104
104
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@vfourny/node-toolkit",
3
- "version": "1.0.3",
4
- "description": "",
3
+ "version": "1.0.4",
4
+ "description": "Toolkit for Node.js projects",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
6
+ "main": "dist/libs/index.js",
7
+ "types": "dist/libs/index.d.ts",
8
8
  "private": false,
9
9
  "scripts": {
10
- "build": "tsc",
10
+ "build": "tsc -b",
11
11
  "lint": "eslint .",
12
12
  "lint:fix": "eslint --fix .",
13
13
  "format": "prettier --write .",
@@ -16,21 +16,38 @@
16
16
  "prepare": "husky"
17
17
  },
18
18
  "files": [
19
- "tsconfig.json",
20
- ".commitlintrc.js",
21
- "release.config.js",
22
- "eslint.config.js",
23
- "prettier.config.js"
19
+ "tsconfig.base.json",
20
+ "dist"
24
21
  ],
25
22
  "exports": {
26
- "./eslint": "./eslint.config.js",
27
- "./prettier": "./prettier.config.js",
28
- "./commitlint": "./.commitlintrc.js",
29
- "./tsconfig": "./tsconfig.json",
30
- "./release": "./release.config.js"
23
+ "./eslint": {
24
+ "types": "./eslint.config.d.ts",
25
+ "default": "./eslint.config.js"
26
+ },
27
+ "./prettier": {
28
+ "types": "./prettier.config.d.ts",
29
+ "default": "./prettier.config.js"
30
+ },
31
+ "./commitlint": {
32
+ "types": "./.commitlintrc.d.ts",
33
+ "default": "./.commitlintrc.js"
34
+ },
35
+ "./release": {
36
+ "types": "./release.config.d.ts",
37
+ "default": "./release.config.js"
38
+ },
39
+ "./tsconfig": "./tsconfig.base.json"
31
40
  },
32
- "keywords": [],
33
- "author": "",
41
+ "keywords": [
42
+ "eslint",
43
+ "prettier",
44
+ "commitlint",
45
+ "semantic-release",
46
+ "formatting",
47
+ "linting",
48
+ "typescript"
49
+ ],
50
+ "author": "Valentin Fourny",
34
51
  "license": "ISC",
35
52
  "dependencies": {
36
53
  "@commitlint/config-angular": "^19.3.0",
@@ -43,6 +60,7 @@
43
60
  "devDependencies": {
44
61
  "@eslint/js": "^9.4.0",
45
62
  "@types/eslint__js": "^8.42.3",
63
+ "@types/eslint-config-prettier": "^6.11.3",
46
64
  "@types/node": "^22.0.0",
47
65
  "conventional-changelog-conventionalcommits": "^8.0.0",
48
66
  "eslint": "^9.3.0",
@@ -1,6 +1,11 @@
1
1
  {
2
- "exclude": ["${configDir}/node_modules", "${configDir}/dist"],
3
- "include": ["${configDir}/src/**/*.ts"],
2
+ "exclude": [
3
+ "${configDir}/node_modules",
4
+ "${configDir}/dist",
5
+ "${configDir}/.nuxt",
6
+ "${configDir}/.output"
7
+ ],
8
+ "include": ["${configDir}/src/**/*"],
4
9
  "compilerOptions": {
5
10
  /* Visit https://aka.ms/tsconfig to read more about this file */
6
11
 
@@ -27,9 +32,9 @@
27
32
  // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
28
33
 
29
34
  /* Modules */
30
- "module": "NodeNext" /* Specify what module code is generated. */,
31
- // "rootDir": "src" /* Specify the root folder within your source files. */,
32
- "moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
35
+ "module": "ESNext" /* Specify what module code is generated. */,
36
+ // "rootDir": "${configDir}/src" /* Specify the root folder within your source files. */,
37
+ "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
33
38
  // "baseUrl": "." /* Specify the base directory to resolve non-relative module names. */,
34
39
  // "paths": {} /* Specify a set of entries that re-map imports to additional lookup locations. */,
35
40
  // "rootDirs": [] /* Allow multiple folders to be treated as one when resolving modules. */,
@@ -52,10 +57,10 @@
52
57
 
53
58
  /* Emit */
54
59
  "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
55
- // "declarationMap": true /* Create sourcemaps for d.ts files. */,
60
+ "declarationMap": true /* Create sourcemaps for d.ts files. */,
56
61
  // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
57
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
58
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
62
+ // "sourceMap": true /* Create source map files for emitted JavaScript files. */,
63
+ "inlineSourceMap": true /* Include sourcemap files inside the emitted JavaScript. */,
59
64
  // "outFile": "./" /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */,
60
65
  "outDir": "${configDir}/dist" /* Specify an output folder for all emitted files. */,
61
66
  // "removeComments": true, /* Disable emitting comments. */
package/.commitlintrc.js DELETED
@@ -1,22 +0,0 @@
1
- export default {
2
- extends: ["@commitlint/config-angular"],
3
- rules: {
4
- "type-enum": [
5
- 2,
6
- "always",
7
- [
8
- "build",
9
- "ci",
10
- "docs",
11
- "feat",
12
- "fix",
13
- "perf",
14
- "refactor",
15
- "revert",
16
- "style",
17
- "test",
18
- "chore",
19
- ],
20
- ],
21
- },
22
- }
package/eslint.config.js DELETED
@@ -1,47 +0,0 @@
1
- import eslintJS from '@eslint/js';
2
- import tseslint from 'typescript-eslint';
3
- import globals from 'globals';
4
- import eslintPluginVue from 'eslint-plugin-vue';
5
- import typescriptEslint from 'typescript-eslint';
6
- import eslintConfigPrettier from 'eslint-config-prettier';
7
-
8
- const vueFilesConfig = {
9
- name: 'eslint-config-seyrinian-tools/vue',
10
- extends: [...eslintPluginVue.configs['flat/recommended']],
11
- files: ['**/*.{ts,vue}'],
12
- languageOptions: {
13
- ecmaVersion: 'latest',
14
- sourceType: 'module',
15
- globals: globals.browser,
16
- parserOptions: {
17
- parser: typescriptEslint.parser,
18
- },
19
- },
20
- rules: {},
21
- };
22
-
23
- const defaultConfig = {
24
- name: 'eslint-config-seyrinian-tools/default',
25
- languageOptions: {
26
- globals: {
27
- ...globals.node,
28
- },
29
- },
30
- rules: {
31
- 'no-console': 'error',
32
- 'no-debugger': 'error',
33
- },
34
- };
35
-
36
- export default tseslint.config(
37
- eslintJS.configs.recommended,
38
- ...tseslint.configs.recommended,
39
- ...tseslint.configs.strict,
40
- ...tseslint.configs.stylistic,
41
- vueFilesConfig,
42
- defaultConfig,
43
- eslintConfigPrettier,
44
- {
45
- ignores: ['node_modules', 'dist/'],
46
- },
47
- );
@@ -1,10 +0,0 @@
1
- export default {
2
- quotes: true,
3
- trailingComma: "all",
4
- semi: false,
5
- printWidth: 80,
6
- tabWidth: 2,
7
- bracketSpacing: true,
8
- bracketLine: false,
9
- arrowParens: "always",
10
- }
package/release.config.js DELETED
@@ -1,27 +0,0 @@
1
- export default {
2
- branches: ['main'],
3
- plugins: [
4
- '@semantic-release/commit-analyzer',
5
- '@semantic-release/release-notes-generator',
6
- [
7
- '@semantic-release/changelog',
8
- {
9
- changelogFile: 'docs/CHANGELOG.md',
10
- },
11
- ],
12
- '@semantic-release/github',
13
- [
14
- '@semantic-release/npm',
15
- {
16
- npmPublish: process.env.PUBLISH === 'true',
17
- pkgRoot: '.',
18
- },
19
- ],
20
- [
21
- '@semantic-release/git',
22
- {
23
- assets: ['docs/CHANGELOG.md', 'package.json', 'package-lock.json'],
24
- },
25
- ],
26
- ],
27
- };