Skip to content

Commit a19414e

Browse files
Jeroen MeeusLyrkan
Jeroen Meeus
authored andcommitted
Removed a default eslint rule
Corrected spelling mistakes Reverted unrelated changes
1 parent ce8c66d commit a19414e

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

index.js

+7-9
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,9 @@ class Encore {
288288
* than the DefinePlugin:
289289
*
290290
* const Encore = require('@symfony/webpack-encore');
291-
* const PluginPriorities =
292-
* require('@symfony/webpack-encore/lib/plugins/plugin-priorities.js');
291+
* const PluginPriorities = require('@symfony/webpack-encore/lib/plugins/plugin-priorities.js');
293292
*
294-
* Encore.addPlugin(new MyWebpackPlugin(),
295-
* PluginPriorities.DefinePlugin);
293+
* Encore.addPlugin(new MyWebpackPlugin(), PluginPriorities.DefinePlugin);
296294
*
297295
* @param {object} plugin
298296
* @param {number} priority
@@ -703,23 +701,23 @@ class Encore {
703701
* https://github.com/MoOx/eslint-loader
704702
*
705703
* // enables the eslint loaded using the default eslint configuration.
706-
* Encore.enableEslint();
704+
* Encore.enableEslintLoader();
707705
*
708706
* // Optionally, you can pass in the configuration eslint should extend.
709-
* Encore.enableEslint('airbnb');
707+
* Encore.enableEslintLoader('airbnb');
710708
*
711709
* // You can also pass in an object of options
712710
* // that will be passed on to the eslint-loader
713-
* Encore.enableEslint({
711+
* Encore.enableEslintLoader({
714712
* extends: 'airbnb',
715713
emitWarning: false
716714
* });
717715
*
718716
* // For a more advanced usage you can pass in a callback
719717
* // https://github.com/MoOx/eslint-loader#options
720-
* Encore.enableEslint((options) => {
718+
* Encore.enableEslintLoader((options) => {
721719
* options.extends = 'airbnb';
722-
* options.emitWarning = fasle;
720+
* options.emitWarning = false;
723721
* });
724722
*
725723
* @param {string|object|function} eslintLoaderOptionsOrCallback

lib/features.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const features = {
7272
method: 'enableEslintLoader()',
7373
// eslint is needed so the end-user can do things
7474
packages: ['eslint', 'eslint-loader', 'babel-eslint', 'eslint-plugin-import'],
75-
description: 'load VUE files'
75+
description: 'Enable ESLint checks'
7676
},
7777
notifier: {
7878
method: 'enableBuildNotifications()',

lib/loaders/eslint.js

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ module.exports = {
2222
const eslintLoaderOptions = {
2323
parser: 'babel-eslint',
2424
emitWarning: true,
25-
rules: {
26-
'linebreak-style': 'off'
27-
},
2825
'import/resolver': {
2926
webpack: {
3027
config: 'webpack.config.js'

test/loaders/eslint.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('loaders/eslint', () => {
2828
config.enableEslintLoader();
2929
const actualOptions = eslintLoader.getOptions(config);
3030

31-
expect(Object.keys(actualOptions)).to.have.lengthOf(4);
31+
expect(Object.keys(actualOptions)).to.have.lengthOf(3);
3232
});
3333

3434
it('getOptions() with extra options', () => {
@@ -39,7 +39,7 @@ describe('loaders/eslint', () => {
3939

4040
const actualOptions = eslintLoader.getOptions(config);
4141

42-
expect(Object.keys(actualOptions)).to.have.lengthOf(5);
42+
expect(Object.keys(actualOptions)).to.have.lengthOf(4);
4343
expect(actualOptions.extends).to.equal('airbnb');
4444
});
4545

@@ -51,7 +51,7 @@ describe('loaders/eslint', () => {
5151

5252
const actualOptions = eslintLoader.getOptions(config);
5353

54-
expect(Object.keys(actualOptions)).to.have.lengthOf(4);
54+
expect(Object.keys(actualOptions)).to.have.lengthOf(3);
5555
expect(actualOptions.emitWarning).to.equal(false);
5656
});
5757
});

0 commit comments

Comments
 (0)