Skip to content

Commit 3f35b77

Browse files
authored
Merge pull request #6 from scalvert/add-create-project-option
2 parents b6ae3d2 + 5e12f1b commit 3f35b77

File tree

11 files changed

+331
-195
lines changed

11 files changed

+331
-195
lines changed

.eslintrc

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

.eslintrc.cjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint', 'prettier', 'jsdoc'],
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:node/recommended',
8+
'plugin:jsdoc/recommended',
9+
'plugin:unicorn/recommended',
10+
'prettier',
11+
],
12+
parserOptions: {
13+
ecmaVersion: 2018,
14+
sourceType: 'module',
15+
},
16+
env: {
17+
browser: false,
18+
node: true,
19+
es6: true,
20+
},
21+
rules: {
22+
'@typescript-eslint/no-unused-vars': 'error',
23+
'unicorn/no-reduce': 'off',
24+
'unicorn/prevent-abbreviations': 'off',
25+
'unicorn/no-process-exit': 'off',
26+
'unicorn/import-style': 'off',
27+
'node/no-missing-import': 'off',
28+
'node/no-unsupported-features/es-syntax': [
29+
'error',
30+
{
31+
ignores: ['modules'],
32+
},
33+
],
34+
'node/no-extraneous-import': ['error'],
35+
'node/no-unpublished-import': [
36+
'error',
37+
{
38+
allowModules: ['vite', 'vitest'],
39+
},
40+
],
41+
},
42+
overrides: [
43+
{
44+
files: ['tests/fixtures/fake-bin.js', 'tests/fixtures/fake-bin-with-env.js'],
45+
rules: {
46+
'node/shebang': 'off',
47+
},
48+
},
49+
],
50+
};

.prettierrc.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
singleQuote: true,
3+
trailingComma: 'es5',
4+
printWidth: 100,
5+
};

.prettierrc.js

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

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,14 @@ describe('Some tests', () => {
5353
expect(result.stdout).toBe('Did some stuff');
5454
});
5555

56-
// Write a file with contents to the tmp directory
5756
test('another test', () => {
58-
project.write({
57+
// Write a file with contents to the tmp directory
58+
await project.writeJSON({
5959
'some/file.txt': 'some content',
6060
});
6161

62-
const result = await runBin({
63-
args: ['--path', 'some/file.txt'], // pass some args to the bin that will be used for only this invocation
64-
});
62+
// pass some args to the bin that will be used for only this invocation
63+
const result = await runBin('--path', 'some/file.txt');
6564

6665
expect(result.stdout).toBe('Read "some/file.txt"');
6766
});

0 commit comments

Comments
 (0)