Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .eslintrc

This file was deleted.

50 changes: 50 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'jsdoc'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:node/recommended',
'plugin:jsdoc/recommended',
'plugin:unicorn/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
browser: false,
node: true,
es6: true,
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'unicorn/no-reduce': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/import-style': 'off',
'node/no-missing-import': 'off',
'node/no-unsupported-features/es-syntax': [
'error',
{
ignores: ['modules'],
},
],
'node/no-extraneous-import': ['error'],
'node/no-unpublished-import': [
'error',
{
allowModules: ['vite', 'vitest'],
},
],
},
overrides: [
{
files: ['tests/fixtures/fake-bin.js', 'tests/fixtures/fake-bin-with-env.js'],
rules: {
'node/shebang': 'off',
},
},
],
};
5 changes: 5 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
};
5 changes: 0 additions & 5 deletions .prettierrc.js

This file was deleted.

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ describe('Some tests', () => {
expect(result.stdout).toBe('Did some stuff');
});

// Write a file with contents to the tmp directory
test('another test', () => {
project.write({
// Write a file with contents to the tmp directory
await project.writeJSON({
'some/file.txt': 'some content',
});

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

expect(result.stdout).toBe('Read "some/file.txt"');
});
Expand Down
Loading