Skip to content

Commit 944ab02

Browse files
committed
(refactor): move lint -> fixtures/lint, and the test out
- because everything other than the test was indeed a fixture, and it's better to properly specify those as such for clarity - and consistency with the other tests (format): fix some linting issues in tsdx-lint.test.js - it's now no longer ignored by the lint script (which ignores the whole directory due to the fixtures)
1 parent 70c8c68 commit 944ab02

8 files changed

Lines changed: 5 additions & 8 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"prepare": "tsc -p tsconfig.json",
2525
"build": "tsc -p tsconfig.json",
2626
"lint": "yarn build && yarn lint:post-build",
27-
"lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/e2e/lint'",
27+
"lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/e2e/fixtures/lint'",
2828
"test": "yarn build && yarn test:post-build",
2929
"test:post-build": "node dist/index.js test",
3030
"start": "tsc -p tsconfig.json --watch",

test/e2e/fixtures/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
- `build-default` focuses on our zero config defaults
44
- `build-invalid` lets us check what happens when we have invalid builds due to type errors
55
- `build-withTsconfig` lets us check that `tsconfig.json` options are correctly used
6+
- `lint` lets us check that lint errors are correctly detected
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
/**
2-
* @jest-environment node
3-
*/
4-
'use strict';
5-
61
const shell = require('shelljs');
7-
const util = require('../../utils/fixture');
2+
3+
const util = require('../utils/fixture');
84

95
shell.config.silent = true;
106

117
const testDir = 'e2e';
128
const stageName = 'stage-lint';
139

14-
const lintDir = `test/${testDir}/lint`
10+
const lintDir = `test/${testDir}/fixtures/lint`;
1511

1612
describe('tsdx lint', () => {
1713
it('should fail to lint a ts file with errors', () => {

0 commit comments

Comments
 (0)