kontonummer 4.0.0 → 5.0.0

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.
@@ -0,0 +1,62 @@
1
+ import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
2
+ import eslint from '@eslint/js'
3
+ import tseslint from 'typescript-eslint'
4
+
5
+ export default [
6
+ ...neostandard({
7
+ ignores: [
8
+ ...resolveIgnoresFromGitignore(),
9
+ ],
10
+ ts: true,
11
+ }),
12
+ eslint.configs.recommended,
13
+ ...tseslint.configs.strictTypeChecked,
14
+ ...tseslint.configs.stylisticTypeChecked,
15
+ {
16
+ languageOptions: {
17
+ parserOptions: {
18
+ projectService: {
19
+ allowDefaultProject: ['*.js', '.*.js', '*.mjs'],
20
+ },
21
+ tsconfigRootDir: process.cwd(),
22
+ },
23
+ },
24
+ },
25
+ {
26
+ name: 'swantzter/custom',
27
+ rules: {
28
+ '@typescript-eslint/restrict-template-expressions': ['warn', {
29
+ allowNumber: true,
30
+ allowBoolean: true,
31
+ allowRegExp: true,
32
+ allowAny: true,
33
+ }],
34
+ '@typescript-eslint/no-this-alias': 'off',
35
+ '@typescript-eslint/only-throw-error': ['error', {
36
+ allowThrowingUnknown: true,
37
+ }],
38
+ '@stylistic/comma-dangle': ['warn', {
39
+ arrays: 'always-multiline',
40
+ objects: 'always-multiline',
41
+ imports: 'always-multiline',
42
+ exports: 'always-multiline',
43
+ functions: 'never',
44
+ }],
45
+ 'no-void': 'off',
46
+ 'no-console': 'warn',
47
+ },
48
+ },
49
+ {
50
+ name: 'swantzter/tests',
51
+ files: ['**/*.test.ts', '**/*.test.js'],
52
+ rules: {
53
+ '@typescript-eslint/ban-ts-comment': ['error', {
54
+ 'ts-expect-error': false,
55
+ 'ts-ignore': true,
56
+ 'ts-nocheck': true,
57
+ 'ts-check': false,
58
+ minimumDescriptionLength: 3,
59
+ }],
60
+ },
61
+ },
62
+ ]
package/package.json CHANGED
@@ -1,16 +1,25 @@
1
1
  {
2
2
  "name": "kontonummer",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "A validator for swedish banking numbers",
5
5
  "author": "Svante Bengtson <svante@swantzter.se> (https://swantzter.se)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://kontonummer.se",
8
8
  "main": "dist/esm/index.js",
9
- "types": "dist/types/index.d.ts",
9
+ "types": "dist/esm/index.d.ts",
10
10
  "exports": {
11
- "import": "./dist/esm/index.js",
12
- "require": "./dist/cjs/index.js",
13
- "default": "./dist/esm/index.js"
11
+ "import": {
12
+ "types": "./dist/esm/index.d.ts",
13
+ "default": "./dist/esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/cjs/index.d.ts",
17
+ "default": "./dist/cjs/index.js"
18
+ },
19
+ "default": {
20
+ "types": "./dist/esm/index.d.ts",
21
+ "default": "./dist/esm/index.js"
22
+ }
14
23
  },
15
24
  "repository": {
16
25
  "type": "git",
@@ -19,22 +28,22 @@
19
28
  "scripts": {
20
29
  "build": "tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json",
21
30
  "build:watch": "tsc --watch -p tsconfig.production.json",
22
- "test": "NODE_OPTIONS='--loader tsx' mocha test/**/*.test.ts",
31
+ "test": "NODE_OPTIONS='--import tsx' mocha test/**/*.test.ts",
23
32
  "test:coverage": " c8 -r lcov -r text npm test",
24
- "lint": "eslint . --ignore-path .gitignore",
33
+ "lint": "eslint .",
25
34
  "lint:fix": "npm run lint -- --fix",
26
35
  "typecheck": "tsc --noEmit",
27
36
  "prepack": "npm run build"
28
37
  },
29
38
  "devDependencies": {
30
- "@types/mocha": "^10.0.1",
31
- "@types/node": "^16.11.57",
32
- "c8": "^7.12.0",
33
- "eslint": "^8.23.0",
34
- "eslint-config-standard-with-typescript": "^34.0.0",
35
- "mocha": "^10.0.0",
36
- "tsx": "^3.9.0",
37
- "typescript": "^4.2.4"
39
+ "@types/mocha": "^10.0.10",
40
+ "@types/node": "^20.19.0",
41
+ "c8": "^10.1.3",
42
+ "eslint": "^9.28.0",
43
+ "mocha": "^11.6.0",
44
+ "neostandard": "^0.12.1",
45
+ "tsx": "^4.20.2",
46
+ "typescript": "^5.8.3"
38
47
  },
39
48
  "keywords": [
40
49
  "banking",
File without changes