Skip to content

Commit 4ca340d

Browse files
committed
eslint . --fix
1 parent be43997 commit 4ca340d

File tree

5 files changed

+129
-127
lines changed

5 files changed

+129
-127
lines changed

.eslintrc.js

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,12 @@ module.exports = {
44
root: true,
55
parserOptions: {
66
ecmaVersion: 2017,
7-
sourceType: 'module'
7+
sourceType: 'module',
88
},
9-
plugins: [
10-
'prettier',
11-
'node',
12-
],
13-
extends: [
14-
'eslint:recommended',
15-
'plugin:node/recommended',
16-
'plugin:prettier/recommended',
17-
],
9+
plugins: ['prettier', 'node'],
10+
extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended'],
1811
env: {
19-
node: true
12+
node: true,
2013
},
2114
rules: {
2215
'node/no-unsupported-features': ['error', { ignores: ['modules'] }],
@@ -27,8 +20,8 @@ module.exports = {
2720
files: ['tests/**'],
2821

2922
env: {
30-
qunit: true
31-
}
32-
}
33-
]
23+
qunit: true,
24+
},
25+
},
26+
],
3427
};

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if (process.env.REQUIRE_TRACE) {
55
// eslint-disable-next-line node/no-unpublished-require
66
const requireSoSlow = require('require-so-slow');
7-
process.on('exit', function() {
7+
process.on('exit', function () {
88
requireSoSlow.write('require-trace.trace');
99
});
1010
}

commands/local/update-docs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ function updateProjectREADME() {
88

99
let transforms = fs
1010
.readdirSync('transforms')
11-
.filter(file => fs.lstatSync(`transforms/${file}`).isDirectory());
11+
.filter((file) => fs.lstatSync(`transforms/${file}`).isDirectory());
1212

1313
let readmeContent = transforms
14-
.map(name => `* [${name}](transforms/${name}/README.md)`)
14+
.map((name) => `* [${name}](transforms/${name}/README.md)`)
1515
.join('\n');
1616

1717
fs.writeFileSync(
@@ -105,7 +105,7 @@ function updateTransformREADMEs() {
105105
const fs = require('fs-extra');
106106

107107
fs.readdirSync('transforms')
108-
.filter(file => fs.lstatSync(`transforms/${file}`).isDirectory())
108+
.filter((file) => fs.lstatSync(`transforms/${file}`).isDirectory())
109109
.forEach(updateTransformREADME);
110110
}
111111

src/test-support.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ function testRunner(options, runTest) {
1212

1313
let transform = require(details.transformPath);
1414

15-
describe(details.name, function() {
15+
describe(details.name, function () {
1616
globby
1717
.sync('**/*.input.*', {
1818
cwd: details.fixtureDir,
1919
absolute: true,
2020
})
21-
.map(entry => entry.slice(entry.indexOf('__testfixtures__') + '__testfixtures__'.length + 1))
22-
.forEach(filename => {
21+
.map((entry) =>
22+
entry.slice(entry.indexOf('__testfixtures__') + '__testfixtures__'.length + 1)
23+
)
24+
.forEach((filename) => {
2325
let extension = path.extname(filename);
2426
let testName = filename.replace(`.input${extension}`, '');
2527
let testInputPath = path.join(details.fixtureDir, `${testName}${extension}`);
@@ -28,24 +30,24 @@ function testRunner(options, runTest) {
2830
let optionsPath = path.join(details.fixtureDir, `${testName}.options.json`);
2931
let options = fs.pathExistsSync(optionsPath) ? fs.readFileSync(optionsPath) : '{}';
3032

31-
describe(testName, function() {
32-
beforeEach(function() {
33+
describe(testName, function () {
34+
beforeEach(function () {
3335
process.env.CODEMOD_CLI_ARGS = options;
3436
});
3537

36-
afterEach(function() {
38+
afterEach(function () {
3739
process.env.CODEMOD_CLI_ARGS = '';
3840
});
3941

40-
it('transforms correctly', function() {
42+
it('transforms correctly', function () {
4143
runTest(
4244
transform,
4345
{ path: testInputPath, source: fs.readFileSync(inputPath, 'utf8') },
4446
fs.readFileSync(outputPath, 'utf8')
4547
);
4648
});
4749

48-
it('is idempotent', function() {
50+
it('is idempotent', function () {
4951
runTest(
5052
transform,
5153
{ path: testInputPath, source: fs.readFileSync(outputPath, 'utf8') },

0 commit comments

Comments
 (0)