Skip to content

Commit dd36ed2

Browse files
committed
feature: overrides
1 parent 7707cea commit dd36ed2

File tree

10 files changed

+18
-28
lines changed

10 files changed

+18
-28
lines changed

.eslintrc.json

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

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
node-version:
1717
- 18.x
1818
- 20.x
19-
- 21.x
19+
- 22.x
2020
steps:
2121
- uses: actions/checkout@v4
2222
- uses: oven-sh/setup-bun@v1
@@ -32,7 +32,7 @@ jobs:
3232
run: npm run fix:lint
3333
- name: Install Rust
3434
run: rustup update
35-
- uses: actions/cache@v3
35+
- uses: actions/cache@v4
3636
with:
3737
path: |
3838
~/.cargo/bin/

.github/workflows/nodejs-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
node-version:
1010
- 18.x
1111
- 20.x
12-
- 21.x
12+
- 22.x
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: oven-sh/setup-bun@v1
@@ -25,7 +25,7 @@ jobs:
2525
run: npm run lint
2626
- name: Install Rust
2727
run: rustup update
28-
- uses: actions/cache@v3
28+
- uses: actions/cache@v4
2929
with:
3030
path: |
3131
~/.cargo/bin/

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ CONTRIBUTING.md
77
yarn-error.log
88

99
_*
10+
*.config.*

.nycrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"**/*.spec.*",
66
"**/fixture",
77
"test",
8-
".*.{js,mjs}"
8+
".*.{js,mjs}",
9+
"**/*.config.*"
910
],
1011
"branches": 100,
1112
"lines": 100,

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {safeAlign} from 'eslint-plugin-putout/config';
2+
3+
export default safeAlign;

lib/auto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const minifiers = [
1313

1414
export default async (data, options) => {
1515
let error;
16-
let result;
16+
let result = data;
1717

1818
for (const minify of minifiers) {
1919
[error, result] = await tryToCatch(minify, data, options);

lib/read-options.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import {findUp} from 'find-up';
22
import _readjson from 'readjson';
33

4-
export async function readOptions({readjson = _readjson, find = findUp} = {}) {
4+
export async function readOptions(overrides = {}) {
5+
const {
6+
readjson = _readjson,
7+
find = findUp,
8+
} = overrides;
9+
510
const optionsPath = await find('.minify.json');
611

712
if (!optionsPath)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"devDependencies": {
5353
"escover": "^4.0.0",
5454
"eslint": "^9.3.0",
55-
"eslint-plugin-n": "^16.0.0",
5655
"eslint-plugin-putout": "^22.1.0",
5756
"madrun": "^10.0.0",
5857
"putout": "^35.5.2",

test/minify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test('minify: auto: not found', async (t) => {
7777
},
7878
});
7979

80-
t.equal(js, result);
80+
t.notOk(result);
8181
t.end();
8282
});
8383

0 commit comments

Comments
 (0)