Skip to content

Commit a9fc74a

Browse files
authored
chore: Lint fix
chore: Lint fix
2 parents a73337c + a91b0cb commit a9fc74a

4 files changed

Lines changed: 71 additions & 1072 deletions

File tree

README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
<h1 align="center">simple-wcswidth</h1>
22
<h3 align="center"> 🖥️ 💬 Simplified JS/TS implementation of wcwidth/wcswidth written by Markus Kuhn in C</h3>
33

4-
<p align="center">
5-
<a href="https://codecov.io/gh/ayonious/simple-wcswidth">
6-
<img alt="codecov" src="https://codecov.io/gh/ayonious/simple-wcswidth/branch/master/graph/badge.svg">
7-
</a>
8-
<a href="https://badge.fury.io/js/simple-wcswidth">
9-
<img alt="npm version" src="https://badge.fury.io/js/simple-wcswidth.svg">
10-
</a>
11-
<a href="https://packagephobia.now.sh/result?p=simple-wcswidth">
12-
<img alt="install size" src="https://packagephobia.now.sh/badge?p=simple-wcswidth@latest">
13-
</a>
14-
</p>
15-
<p align="center">
16-
<a href="https://github.com/semantic-release/semantic-release">
17-
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
18-
</a>
19-
</p>
4+
[![codecov](https://codecov.io/gh/console-table-printer/simple-wcswidth/graph/badge.svg?token=X4QPKTCB6A)](https://codecov.io/gh/console-table-printer/simple-wcswidth)
5+
[![npm version](https://badge.fury.io/js/simple-wcswidth.svg)](https://badge.fury.io/js/simple-wcswidth)
6+
[![install size](https://packagephobia.now.sh/badge?p=simple-wcswidth@latest)](https://packagephobia.now.sh/result?p=simple-wcswidth)
7+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8+
209

2110
# Why another wcswidth?
2211

eslint.config.js

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,64 @@
11
const eslint = require('@eslint/js');
22
const tseslint = require('typescript-eslint');
3-
const prettier = require('eslint-plugin-prettier');
4-
const importPlugin = require('eslint-plugin-import');
3+
const prettier = require('eslint-config-prettier');
4+
const eslintPluginPrettier = require('eslint-plugin-prettier/recommended');
55

6-
module.exports = tseslint.config(
7-
eslint.configs.recommended,
8-
...tseslint.configs.recommended,
6+
module.exports = [
97
{
10-
files: ['**/*.ts'],
11-
languageOptions: {
12-
ecmaVersion: 2018,
13-
sourceType: 'module',
14-
parser: tseslint.parser,
15-
parserOptions: {
16-
project: './tsconfig.json',
8+
ignores: [
9+
'**/dist/**',
10+
'**/node_modules/**',
11+
'**/coverage/**',
12+
'**/*.test.ts',
13+
'**/*.test.js',
14+
'**/test/**',
15+
'eslint.config.js',
16+
],
17+
},
18+
...tseslint.config(
19+
eslint.configs.recommended,
20+
...tseslint.configs.recommended,
21+
prettier,
22+
eslintPluginPrettier,
23+
{
24+
languageOptions: {
25+
parserOptions: {
26+
ecmaVersion: 'latest',
27+
sourceType: 'commonjs',
28+
},
29+
globals: {
30+
// ES2015 globals
31+
Promise: 'readonly',
32+
Symbol: 'readonly',
33+
// Node.js globals
34+
process: 'readonly',
35+
module: 'readonly',
36+
require: 'readonly',
37+
__dirname: 'readonly',
38+
__filename: 'readonly',
39+
exports: 'readonly',
40+
// Jest globals
41+
jest: 'readonly',
42+
describe: 'readonly',
43+
it: 'readonly',
44+
expect: 'readonly',
45+
beforeEach: 'readonly',
46+
afterEach: 'readonly',
47+
// Other globals
48+
Atomics: 'readonly',
49+
SharedArrayBuffer: 'readonly',
50+
},
1751
},
18-
},
19-
plugins: {
20-
'@typescript-eslint': tseslint.plugin,
21-
'prettier': prettier,
22-
'import': importPlugin,
23-
},
24-
rules: {
25-
'prettier/prettier': 'error',
26-
'no-console': 'off',
27-
'import/no-unresolved': 'off',
28-
'import/extensions': 'off',
29-
'comma-dangle': 'off',
30-
'no-unused-vars': 'off',
31-
'camelcase': 'off',
32-
},
33-
settings: {
34-
'import/resolver': {
35-
typescript: {},
52+
rules: {
53+
'prettier/prettier': 'error',
54+
'no-console': 'off',
55+
'import/no-unresolved': 'off',
56+
'import/extensions': 'off',
57+
'comma-dangle': 'off',
58+
'no-unused-vars': 'off',
59+
camelcase: 'off',
60+
'@typescript-eslint/no-explicit-any': 'off',
3661
},
37-
},
38-
},
39-
{
40-
files: ['**/*.js'],
41-
languageOptions: {
42-
ecmaVersion: 2018,
43-
sourceType: 'module',
44-
},
45-
plugins: {
46-
'prettier': prettier,
47-
'import': importPlugin,
48-
},
49-
rules: {
50-
'prettier/prettier': 'error',
51-
'no-console': 'off',
52-
'import/no-unresolved': 'off',
53-
'import/extensions': 'off',
54-
'comma-dangle': 'off',
55-
},
56-
},
57-
{
58-
ignores: ['dist/**', 'node_modules/**', 'coverage/**'],
59-
}
60-
);
62+
}
63+
),
64+
];

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Simplified JS/TS implementation of wcswidth() written by Markus Kuhn in C",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
7-
"repository": "git@github.com:ayonious/simple-wcswidth.git",
7+
"repository": "git@github.com:console-table-printer/simple-wcswidth.git",
88
"author": "Nahiyan Kamal <noyanayihan@gmail.com>",
99
"license": "MIT",
1010
"scripts": {
@@ -28,7 +28,7 @@
2828
"@semantic-release/git": "^10.0.1",
2929
"@types/jest": "^29.5.14",
3030
"eslint": "^9.0.0",
31-
"eslint-plugin-import": "^2.31.0",
31+
"eslint-config-prettier": "^10.1.5",
3232
"eslint-plugin-prettier": "^5.4.1",
3333
"husky": "^9.1.7",
3434
"jest": "^30.0.0",

0 commit comments

Comments
 (0)