Skip to content

Commit 7b71a2a

Browse files
committed
update libs and remodernized the code for test
1 parent f480449 commit 7b71a2a

14 files changed

+3987
-6611
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ This package has been completely modernized with:
2020
## Installation
2121

2222
```bash
23-
npm install transformers-names-full
23+
npm install @cracdev/transformers-names
2424
```
2525

2626
## Usage
2727

2828
### ES Modules (Recommended)
2929

3030
```javascript
31-
import transformers, { all, random } from 'transformers-names-full'
31+
import transformers, { all, random } from '@cracdev/transformers-names'
3232

3333
// Get a random name
3434
console.log(random()) // 'Optimus Prime'

babel.config.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

eslint.config.js

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
import js from '@eslint/js'
22
import globals from 'globals'
3+
import tsEslint from '@typescript-eslint/eslint-plugin'
4+
import tsParser from '@typescript-eslint/parser'
35

46
export default [
57
js.configs.recommended,
68
{
9+
files: ['**/*.js'],
710
languageOptions: {
811
globals: {
912
...globals.node,
1013
...globals.es2022,
11-
...globals.mocha,
1214
},
13-
ecmaVersion: 2022,
15+
ecmaVersion: 2023,
1416
sourceType: 'module',
17+
parserOptions: {
18+
ecmaFeatures: {
19+
importAssertions: true,
20+
},
21+
},
1522
},
1623
rules: {
1724
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
@@ -25,9 +32,53 @@ export default [
2532
},
2633
},
2734
{
28-
files: ['**/*.spec.js', '**/*.test.js'],
35+
files: ['**/*.ts'],
36+
languageOptions: {
37+
globals: {
38+
...globals.node,
39+
...globals.es2022,
40+
...globals.vitest,
41+
},
42+
parser: tsParser,
43+
parserOptions: {
44+
ecmaVersion: 2023,
45+
sourceType: 'module',
46+
project: './tsconfig.json',
47+
},
48+
},
49+
plugins: {
50+
'@typescript-eslint': tsEslint,
51+
},
52+
rules: {
53+
...tsEslint.configs.recommended.rules,
54+
'@typescript-eslint/no-unused-vars': [
55+
'error',
56+
{ argsIgnorePattern: '^_' },
57+
],
58+
'no-unused-vars': 'off',
59+
'no-redeclare': 'off',
60+
'@typescript-eslint/no-redeclare': 'off',
61+
'no-console': 'warn',
62+
'prefer-const': 'error',
63+
'no-var': 'error',
64+
'object-shorthand': 'error',
65+
'prefer-arrow-callback': 'error',
66+
'arrow-spacing': 'error',
67+
'prefer-template': 'error',
68+
},
69+
},
70+
{
71+
files: ['**/*.spec.ts', '**/*.test.ts'],
72+
languageOptions: {
73+
globals: {
74+
...globals.node,
75+
...globals.es2022,
76+
...globals.vitest,
77+
},
78+
},
2979
rules: {
3080
'no-unused-expressions': 'off',
81+
'@typescript-eslint/no-unused-expressions': 'off',
3182
},
3283
},
3384
]

0 commit comments

Comments
 (0)