Skip to content

Commit fd4b16b

Browse files
committed
[meta] enable quotes rule everywhere
1 parent 877e22c commit fd4b16b

17 files changed

+163
-172
lines changed

Diff for: .eslintrc

+9
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,14 @@
7272
"no-console": "off",
7373
},
7474
},
75+
{
76+
"files": [
77+
"resolvers/*/test/**/*",
78+
],
79+
"env": {
80+
"mocha": true,
81+
"es6": false
82+
},
83+
}
7584
],
7685
}

Diff for: resolvers/node/test/.eslintrc

-9
This file was deleted.

Diff for: resolvers/node/test/native.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exports.natively = function () { return "but where do we feature?"; };
1+
exports.natively = function () { return 'but where do we feature?'; };

Diff for: resolvers/node/test/paths.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ const expect = require('chai').expect;
33
const path = require('path');
44
const node = require('../index.js');
55

6-
describe("paths", function () {
7-
it("handles base path relative to CWD", function () {
6+
describe('paths', function () {
7+
it('handles base path relative to CWD', function () {
88
expect(node.resolve('../', './test/file.js'))
99
.to.have.property('path')
1010
.equal(path.resolve(__dirname, '../index.js'));
1111
});
1212
});
1313

1414

15-
describe("core", function () {
16-
it("returns found, but null path, for core Node modules", function () {
17-
const resolved = node.resolve('fs', "./test/file.js");
18-
expect(resolved).has.property("found", true);
19-
expect(resolved).has.property("path", null);
15+
describe('core', function () {
16+
it('returns found, but null path, for core Node modules', function () {
17+
const resolved = node.resolve('fs', './test/file.js');
18+
expect(resolved).has.property('found', true);
19+
expect(resolved).has.property('path', null);
2020
});
2121
});
2222

2323

24-
describe("default options", function () {
24+
describe('default options', function () {
2525

26-
it("finds .json files", function () {
26+
it('finds .json files', function () {
2727
expect(node.resolve('./data', './test/file.js'))
2828
.to.have.property('path')
2929
.equal(path.resolve(__dirname, './data.json'));
@@ -34,25 +34,25 @@ describe("default options", function () {
3434
.to.have.property('found', false);
3535
});
3636

37-
it("finds mjs modules, with precedence over .js", function () {
37+
it('finds mjs modules, with precedence over .js', function () {
3838
expect(node.resolve('./native', './test/file.js'))
3939
.to.have.property('path')
4040
.equal(path.resolve(__dirname, './native.mjs'));
4141
});
4242

43-
it("finds .node modules, with lowest precedence", function () {
43+
it('finds .node modules, with lowest precedence', function () {
4444
expect(node.resolve('./native.node', './test/file.js'))
4545
.to.have.property('path')
4646
.equal(path.resolve(__dirname, './native.node'));
4747
});
4848

49-
it("finds .node modules", function () {
49+
it('finds .node modules', function () {
5050
expect(node.resolve('./dot-node', './test/file.js'))
5151
.to.have.property('path')
5252
.equal(path.resolve(__dirname, './dot-node.node'));
5353
});
5454

55-
it("still finds .js if explicit", function () {
55+
it('still finds .js if explicit', function () {
5656
expect(node.resolve('./native.js', './test/file.js'))
5757
.to.have.property('path')
5858
.equal(path.resolve(__dirname, './native.js'));

Diff for: resolvers/webpack/test/.eslintrc

-6
This file was deleted.

Diff for: resolvers/webpack/test/alias.js

+76-76
Original file line numberDiff line numberDiff line change
@@ -8,132 +8,132 @@ const webpack = require('../index');
88

99
const file = path.join(__dirname, 'files', 'dummy.js');
1010

11-
describe("resolve.alias", function () {
11+
describe('resolve.alias', function () {
1212
let resolved;
1313
before(function () { resolved = webpack.resolve('foo', file); });
1414

15-
it("is found", function () { expect(resolved).to.have.property('found', true); });
15+
it('is found', function () { expect(resolved).to.have.property('found', true); });
1616

17-
it("is correct", function () {
17+
it('is correct', function () {
1818
expect(resolved).to.have.property('path')
1919
.and.equal(path.join(__dirname, 'files', 'some', 'goofy', 'path', 'foo.js'));
2020
});
2121
});
2222

2323
// todo: reimplement with resolver function / config
24-
// describe.skip("webpack alias spec", function () {
24+
// describe.skip('webpack alias spec', function () {
2525
// // from table: http://webpack.github.io/docs/configuration.html#resolve-alias
2626
// function tableLine(alias, xyz, xyzFile) {
2727
// describe(JSON.stringify(alias), function () {
28-
// it("xyz: " + xyz, function () {
29-
// expect(resolveAlias('xyz', alias)).to.equal(xyz)
30-
// })
31-
// it("xyz/file: " + (xyzFile.name || xyzFile), function () {
28+
// it('xyz: ' + xyz, function () {
29+
// expect(resolveAlias('xyz', alias)).to.equal(xyz);
30+
// });
31+
// it('xyz/file: ' + (xyzFile.name || xyzFile), function () {
3232
// if (xyzFile === Error) {
33-
// expect(resolveAlias.bind(null, 'xyz/file', alias)).to.throw(xyzFile)
33+
// expect(resolveAlias.bind(null, 'xyz/file', alias)).to.throw(xyzFile);
3434
// } else {
35-
// expect(resolveAlias('xyz/file', alias)).to.equal(xyzFile)
35+
// expect(resolveAlias('xyz/file', alias)).to.equal(xyzFile);
3636
// }
37-
// })
38-
// })
37+
// });
38+
// });
3939
// }
4040

4141
// tableLine( {}
42-
// , 'xyz', 'xyz/file' )
42+
// , 'xyz', 'xyz/file' );
4343

44-
// tableLine( { xyz: "/absolute/path/to/file.js" }
45-
// , '/absolute/path/to/file.js', 'xyz/file' )
44+
// tableLine( { xyz: '/absolute/path/to/file.js' }
45+
// , '/absolute/path/to/file.js', 'xyz/file' );
4646

47-
// tableLine( { xyz$: "/absolute/path/to/file.js" }
48-
// , "/absolute/path/to/file.js", Error )
47+
// tableLine( { xyz$: '/absolute/path/to/file.js' }
48+
// , '/absolute/path/to/file.js', Error );
4949

50-
// tableLine( { xyz: "./dir/file.js" }
51-
// , './dir/file.js', 'xyz/file' )
50+
// tableLine( { xyz: './dir/file.js' }
51+
// , './dir/file.js', 'xyz/file' );
5252

53-
// tableLine( { xyz$: "./dir/file.js" }
54-
// , './dir/file.js', Error )
53+
// tableLine( { xyz$: './dir/file.js' }
54+
// , './dir/file.js', Error );
5555

56-
// tableLine( { xyz: "/some/dir" }
57-
// , '/some/dir', '/some/dir/file' )
56+
// tableLine( { xyz: '/some/dir' }
57+
// , '/some/dir', '/some/dir/file' );
5858

59-
// tableLine( { xyz$: "/some/dir" }
60-
// , '/some/dir', 'xyz/file' )
59+
// tableLine( { xyz$: '/some/dir' }
60+
// , '/some/dir', 'xyz/file' );
6161

62-
// tableLine( { xyz: "./dir" }
63-
// , './dir', './dir/file' )
62+
// tableLine( { xyz: './dir' }
63+
// , './dir', './dir/file' );
6464

65-
// tableLine( { xyz: "modu" }
66-
// , 'modu', 'modu/file' )
65+
// tableLine( { xyz: 'modu' }
66+
// , 'modu', 'modu/file' );
6767

68-
// tableLine( { xyz$: "modu" }
69-
// , 'modu', 'xyz/file' )
68+
// tableLine( { xyz$: 'modu' }
69+
// , 'modu', 'xyz/file' );
7070

71-
// tableLine( { xyz: "modu/some/file.js" }
72-
// , 'modu/some/file.js', Error )
71+
// tableLine( { xyz: 'modu/some/file.js' }
72+
// , 'modu/some/file.js', Error );
7373

74-
// tableLine( { xyz: "modu/dir" }
75-
// , 'modu/dir', 'modu/dir/file' )
74+
// tableLine( { xyz: 'modu/dir' }
75+
// , 'modu/dir', 'modu/dir/file' );
7676

77-
// tableLine( { xyz: "xyz/dir" }
78-
// , 'xyz/dir', 'xyz/dir/file' )
77+
// tableLine( { xyz: 'xyz/dir' }
78+
// , 'xyz/dir', 'xyz/dir/file' );
7979

80-
// tableLine( { xyz$: "xyz/dir" }
81-
// , 'xyz/dir', 'xyz/file' )
82-
// })
80+
// tableLine( { xyz$: 'xyz/dir' }
81+
// , 'xyz/dir', 'xyz/file' );
82+
// });
8383

84-
// describe.skip("nested module names", function () {
84+
// describe.skip('nested module names', function () {
8585
// // from table: http://webpack.github.io/docs/configuration.html#resolve-alias
8686
// function nestedName(alias, xyz, xyzFile) {
8787
// describe(JSON.stringify(alias), function () {
88-
// it("top/xyz: " + xyz, function () {
89-
// expect(resolveAlias('top/xyz', alias)).to.equal(xyz)
90-
// })
91-
// it("top/xyz/file: " + (xyzFile.name || xyzFile), function () {
88+
// it('top/xyz: ' + xyz, function () {
89+
// expect(resolveAlias('top/xyz', alias)).to.equal(xyz);
90+
// });
91+
// it('top/xyz/file: ' + (xyzFile.name || xyzFile), function () {
9292
// if (xyzFile === Error) {
93-
// expect(resolveAlias.bind(null, 'top/xyz/file', alias)).to.throw(xyzFile)
93+
// expect(resolveAlias.bind(null, 'top/xyz/file', alias)).to.throw(xyzFile);
9494
// } else {
95-
// expect(resolveAlias('top/xyz/file', alias)).to.equal(xyzFile)
95+
// expect(resolveAlias('top/xyz/file', alias)).to.equal(xyzFile);
9696
// }
97-
// })
98-
// })
97+
// });
98+
// });
9999
// }
100100

101-
// nestedName( { 'top/xyz': "/absolute/path/to/file.js" }
102-
// , '/absolute/path/to/file.js', 'top/xyz/file' )
101+
// nestedName( { 'top/xyz': '/absolute/path/to/file.js' }
102+
// , '/absolute/path/to/file.js', 'top/xyz/file' );
103103

104-
// nestedName( { 'top/xyz$': "/absolute/path/to/file.js" }
105-
// , "/absolute/path/to/file.js", Error )
104+
// nestedName( { 'top/xyz$': '/absolute/path/to/file.js' }
105+
// , '/absolute/path/to/file.js', Error );
106106

107-
// nestedName( { 'top/xyz': "./dir/file.js" }
108-
// , './dir/file.js', 'top/xyz/file' )
107+
// nestedName( { 'top/xyz': './dir/file.js' }
108+
// , './dir/file.js', 'top/xyz/file' );
109109

110-
// nestedName( { 'top/xyz$': "./dir/file.js" }
111-
// , './dir/file.js', Error )
110+
// nestedName( { 'top/xyz$': './dir/file.js' }
111+
// , './dir/file.js', Error );
112112

113-
// nestedName( { 'top/xyz': "/some/dir" }
114-
// , '/some/dir', '/some/dir/file' )
113+
// nestedName( { 'top/xyz': '/some/dir' }
114+
// , '/some/dir', '/some/dir/file' );
115115

116-
// nestedName( { 'top/xyz$': "/some/dir" }
117-
// , '/some/dir', 'top/xyz/file' )
116+
// nestedName( { 'top/xyz$': '/some/dir' }
117+
// , '/some/dir', 'top/xyz/file' );
118118

119-
// nestedName( { 'top/xyz': "./dir" }
120-
// , './dir', './dir/file' )
119+
// nestedName( { 'top/xyz': './dir' }
120+
// , './dir', './dir/file' );
121121

122-
// nestedName( { 'top/xyz': "modu" }
123-
// , 'modu', 'modu/file' )
122+
// nestedName( { 'top/xyz': 'modu' }
123+
// , 'modu', 'modu/file' );
124124

125-
// nestedName( { 'top/xyz$': "modu" }
126-
// , 'modu', 'top/xyz/file' )
125+
// nestedName( { 'top/xyz$': 'modu' }
126+
// , 'modu', 'top/xyz/file' );
127127

128-
// nestedName( { 'top/xyz': "modu/some/file.js" }
129-
// , 'modu/some/file.js', Error )
128+
// nestedName( { 'top/xyz': 'modu/some/file.js' }
129+
// , 'modu/some/file.js', Error );
130130

131-
// nestedName( { 'top/xyz': "modu/dir" }
132-
// , 'modu/dir', 'modu/dir/file' )
131+
// nestedName( { 'top/xyz': 'modu/dir' }
132+
// , 'modu/dir', 'modu/dir/file' );
133133

134-
// nestedName( { 'top/xyz': "top/xyz/dir" }
135-
// , 'top/xyz/dir', 'top/xyz/dir/file' )
134+
// nestedName( { 'top/xyz': 'top/xyz/dir' }
135+
// , 'top/xyz/dir', 'top/xyz/dir/file' );
136136

137-
// nestedName( { 'top/xyz$': "top/xyz/dir" }
138-
// , 'top/xyz/dir', 'top/xyz/file' )
139-
// })
137+
// nestedName( { 'top/xyz$': 'top/xyz/dir' }
138+
// , 'top/xyz/dir', 'top/xyz/file' );
139+
// });

Diff for: resolvers/webpack/test/config.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ const absoluteSettings = {
1313
config: path.join(__dirname, 'files', 'some', 'absolute.path.webpack.config.js'),
1414
};
1515

16-
describe("config", function () {
17-
it("finds webpack.config.js in parent directories", function () {
16+
describe('config', function () {
17+
it('finds webpack.config.js in parent directories', function () {
1818
expect(resolve('main-module', file)).to.have.property('path')
1919
.and.equal(path.join(__dirname, 'files', 'src', 'main-module.js'));
2020
});
2121

22-
it("finds absolute webpack.config.js files", function () {
22+
it('finds absolute webpack.config.js files', function () {
2323
expect(resolve('foo', file, absoluteSettings)).to.have.property('path')
2424
.and.equal(path.join(__dirname, 'files', 'some', 'absolutely', 'goofy', 'path', 'foo.js'));
2525
});
2626

27-
it("finds compile-to-js configs", function () {
27+
it('finds compile-to-js configs', function () {
2828
const settings = {
2929
config: path.join(__dirname, './files/webpack.config.babel.js'),
3030
};
@@ -34,13 +34,13 @@ describe("config", function () {
3434
.and.equal(path.join(__dirname, 'files', 'src', 'main-module.js'));
3535
});
3636

37-
it("finds compile-to-js config in parent directories", function () {
37+
it('finds compile-to-js config in parent directories', function () {
3838
expect(resolve('main-module', extensionFile))
3939
.to.have.property('path')
4040
.and.equal(path.join(__dirname, 'config-extensions', 'src', 'main-module.js'));
4141
});
4242

43-
it("finds the first config with a resolve section", function () {
43+
it('finds the first config with a resolve section', function () {
4444
const settings = {
4545
config: path.join(__dirname, './files/webpack.config.multiple.js'),
4646
};
@@ -49,7 +49,7 @@ describe("config", function () {
4949
.and.equal(path.join(__dirname, 'files', 'src', 'main-module.js'));
5050
});
5151

52-
it("finds the config at option config-index", function () {
52+
it('finds the config at option config-index', function () {
5353
const settings = {
5454
config: path.join(__dirname, './files/webpack.config.multiple.js'),
5555
'config-index': 2,
@@ -66,23 +66,23 @@ describe("config", function () {
6666
expect(function () { resolve('foo', file, settings); }).to.throw(Error);
6767
});
6868

69-
it("finds config object when config is an object", function () {
69+
it('finds config object when config is an object', function () {
7070
const settings = {
7171
config: require(path.join(__dirname, 'files', 'some', 'absolute.path.webpack.config.js')),
7272
};
7373
expect(resolve('foo', file, settings)).to.have.property('path')
7474
.and.equal(path.join(__dirname, 'files', 'some', 'absolutely', 'goofy', 'path', 'foo.js'));
7575
});
7676

77-
it("finds config object when config uses a path relative to working dir", function () {
77+
it('finds config object when config uses a path relative to working dir', function () {
7878
const settings = {
7979
config: './test/files/some/absolute.path.webpack.config.js',
8080
};
8181
expect(resolve('foo', file, settings)).to.have.property('path')
8282
.and.equal(path.join(__dirname, 'files', 'some', 'absolutely', 'goofy', 'path', 'foo.js'));
8383
});
8484

85-
it("finds the first config with a resolve section when config is an array of config objects", function () {
85+
it('finds the first config with a resolve section when config is an array of config objects', function () {
8686
const settings = {
8787
config: require(path.join(__dirname, './files/webpack.config.multiple.js')),
8888
};
@@ -91,7 +91,7 @@ describe("config", function () {
9191
.and.equal(path.join(__dirname, 'files', 'src', 'main-module.js'));
9292
});
9393

94-
it("finds the config at option config-index when config is an array of config objects", function () {
94+
it('finds the config at option config-index when config is an array of config objects', function () {
9595
const settings = {
9696
config: require(path.join(__dirname, './files/webpack.config.multiple.js')),
9797
'config-index': 2,

0 commit comments

Comments
 (0)