@ceylar/ada 0.0.9 → 0.0.11

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.
@@ -1,11 +1,11 @@
1
- const isEmpty = (obj: object) => {
2
- for (const prop in obj) {
3
- if (Object.hasOwn(obj, prop)) {
4
- return false;
5
- }
6
- }
7
-
8
- return true;
9
- };
10
-
11
- export { isEmpty };
1
+ function isEmpty(obj: object) {
2
+ for (const prop in obj) {
3
+ if (Object.hasOwn(obj, prop)) {
4
+ return false
5
+ }
6
+ }
7
+
8
+ return true
9
+ }
10
+
11
+ export { isEmpty }
@@ -1,15 +1,15 @@
1
- const logger = {
2
- info(message: string) {
3
- console.log(`\x1b[32m${message}\x1b[0m`);
4
- },
5
-
6
- warn(message: string) {
7
- console.log(`\x1b[33m${message}\x1b[0m`);
8
- },
9
-
10
- error(message: string) {
11
- console.log(`\x1b[31m${message}\x1b[0m`);
12
- }
13
- };
14
-
15
- export { logger };
1
+ const logger = {
2
+ info(message: string) {
3
+ console.log(`\x1B[32m${message}\x1B[0m`)
4
+ },
5
+
6
+ warn(message: string) {
7
+ console.log(`\x1B[33m${message}\x1B[0m`)
8
+ },
9
+
10
+ error(message: string) {
11
+ console.log(`\x1B[31m${message}\x1B[0m`)
12
+ },
13
+ }
14
+
15
+ export { logger }
@@ -1,7 +1,7 @@
1
- import { resolve } from 'path';
2
-
3
- const resolveCurrentDir = (...paths: string[]) => {
4
- return resolve(import.meta.dirname, ...paths);
5
- };
6
-
7
- export { resolveCurrentDir };
1
+ import { resolve } from 'node:path'
2
+
3
+ function resolveCurrentDir(...paths: string[]) {
4
+ return resolve(import.meta.dirname, ...paths)
5
+ }
6
+
7
+ export { resolveCurrentDir }
package/tsconfig.json CHANGED
@@ -1,32 +1,34 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": [
5
- "ES2023",
6
- "dom"
7
- ],
8
- "module": "ESNext",
9
- "skipLibCheck": true,
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "isolatedModules": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
- /* Linting */
17
- "strict": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noUncheckedSideEffectImports": true,
22
- "baseUrl": ".",
23
- "paths": {
24
- "@/*": [
25
- "./src/*"
26
- ]
27
- }
28
- },
29
- "include": [
30
- "src/**/*.ts"
31
- ]
32
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": [
5
+ "ES2023"
6
+ ],
7
+ "moduleDetection": "force",
8
+ "baseUrl": ".",
9
+ "module": "ESNext",
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "paths": {
13
+ "@/*": [
14
+ "./src/*"
15
+ ]
16
+ },
17
+ "types": [
18
+ "node"
19
+ ],
20
+ "allowImportingTsExtensions": true,
21
+ /* Linting */
22
+ "strict": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+ "noUnusedLocals": true,
25
+ "noUnusedParameters": true,
26
+ "noEmit": true,
27
+ "isolatedModules": true,
28
+ "skipLibCheck": true,
29
+ "noUncheckedSideEffectImports": true
30
+ },
31
+ "include": [
32
+ "src/**/*.ts"
33
+ ]
34
+ }
package/eslint.config.mjs DELETED
@@ -1,63 +0,0 @@
1
- import js from '@eslint/js';
2
-
3
- import react from 'eslint-plugin-react';
4
- import reactHooks from 'eslint-plugin-react-hooks';
5
- import simpleImportSort from 'eslint-plugin-simple-import-sort';
6
- import globals from 'globals';
7
- import ts from 'typescript-eslint';
8
-
9
- /** @type {import('eslint').Linter.Config<Linter.RulesRecord>[]} */
10
- export default ts.config(
11
- js.configs.recommended,
12
- ...ts.configs.recommended,
13
- {
14
- plugins: {
15
- react: react,
16
- 'react-hooks': reactHooks,
17
- 'simple-import-sort': simpleImportSort,
18
- ts: ts.plugin
19
- },
20
- rules: {
21
- 'prefer-const': 'error',
22
- 'no-else-return': 'error',
23
-
24
- 'simple-import-sort/exports': 'error',
25
- 'simple-import-sort/imports': [
26
- 'error',
27
- {
28
- groups: [
29
- ['^@(([\\/.]?\\w)|assets|test-utils)'],
30
- ['^\\u0000'],
31
- ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
32
- ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
33
- ['^.+\\.s?css$']
34
- ]
35
- }
36
- ]
37
- },
38
- languageOptions: {
39
- globals: {
40
- ...globals.node,
41
- ...globals.browser,
42
- ...globals.es2022
43
- }
44
- }
45
- },
46
- {
47
- languageOptions: {
48
- parserOptions: {
49
- project: ['tsconfig.json']
50
- }
51
- },
52
- files: ['/src/**/*.ts', '/src/**/*.tsx']
53
- },
54
- {
55
- languageOptions: {
56
- parserOptions: react.configs.recommended.parserOptions
57
- },
58
- files: ['/src/**/*.js', '/src/**/*.jsx']
59
- },
60
- {
61
- ignores: ['node_modules', 'bin']
62
- }
63
- );