Skip to content

Commit 3f3ae77

Browse files
Align configs with sibling repos
1 parent b51ef59 commit 3f3ae77

5 files changed

Lines changed: 21 additions & 24 deletions

File tree

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ typedoc.json
1414
tsconfig.*
1515
pnpm-lock.yaml
1616
package-lock.json
17+
eslint.config.*
18+
vitest.config.*
19+
rollup.config.*

eslint.config.mjs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
import eslint from '@eslint/js';
22
import tseslint from 'typescript-eslint';
3-
import { fileURLToPath } from 'node:url';
4-
import { dirname } from 'node:path';
5-
6-
const __dirname = dirname(fileURLToPath(import.meta.url));
73

84
export default tseslint.config(
95
eslint.configs.recommended,
106
...tseslint.configs.recommended,
117
{
128
rules: {
13-
"semi": "off",
14-
"indent": ["warn", "tab", { "SwitchCase": 1 }]
9+
"semi": ["warn", "always"],
10+
"indent": ["warn", "tab", { "SwitchCase": 1 }],
11+
"@typescript-eslint/no-explicit-any": "off"
1512
},
16-
files: ['src/**/*.ts', 'tests/**/*.ts', '*.ts'],
17-
languageOptions: {
18-
parserOptions: {
19-
project: ['./tsconfig.json'],
20-
tsconfigRootDir: __dirname,
21-
}
13+
files: ['src/**/*.ts'],
14+
languageOptions: {
15+
ecmaVersion: 2022,
16+
sourceType: 'module',
17+
globals: {
18+
console: 'readonly',
19+
process: 'readonly'
2220
}
21+
}
2322
}
2423
);

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"author": "electricessence",
66
"license": "MIT",
77
"type": "module",
8-
"main": "./dist/cjs/StringSegment.js",
9-
"module": "./dist/esm/StringSegment.js",
108
"exports": {
119
".": {
1210
"types": "./dist/types/StringSegment.d.ts",
@@ -84,10 +82,8 @@
8482
"semver@>=7.0.0 <7.5.2": ">=7.5.2",
8583
"get-func-name@<2.0.1": ">=2.0.1",
8684
"@babel/traverse@<7.23.2": ">=7.23.2",
87-
"braces@<3.0.3": ">=3.0.3"
88-
},
89-
"ignoredBuiltDependencies": [
90-
"esbuild"
91-
]
85+
"braces@<3.0.3": ">=3.0.3",
86+
"@isaacs/brace-expansion@<=5.0.0": ">=5.0.1"
87+
}
9288
}
9389
}

src/StringSegment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export class StringSegment
8383
const bufferLen = buffer?.length ?? 0;
8484
offset = offset ?? 0;
8585
if(buffer == null && offset !== 0) {
86-
throw new ArgumentOutOfRangeException(
87-
'offset', offset,
88-
'Cannot specify a non-zero offset when buffer is null.');
86+
throw new ArgumentOutOfRangeException(
87+
'offset', offset,
88+
'Cannot specify a non-zero offset when buffer is null.');
8989
}
9090

9191
if(offset < 0 || offset > bufferLen)

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"esModuleInterop": true,
1313
"removeComments": true,
1414
"importHelpers": true,
15-
"moduleResolution": "node",
16-
"types": []
15+
"moduleResolution": "node"
1716
// No outDir, module, declaration, etc.
1817
},
1918
"include": ["src/**/*"],

0 commit comments

Comments
 (0)