Skip to content

Commit 73cf6e6

Browse files
author
Jeroen Meeus
committed
Removed a default eslint rule
Corrected spelling mistakes Reverted unrelated changes
1 parent fab12a4 commit 73cf6e6

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

index.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,9 @@ const publicApi = {
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 {string} plugin
298296
* @param {number} priority
@@ -637,23 +635,23 @@ const publicApi = {
637635
* https://github.com/MoOx/eslint-loader
638636
*
639637
* // enables the eslint loaded using the default eslint configuration.
640-
* Encore.enableEslint();
638+
* Encore.enableEslintLoader();
641639
*
642640
* // Optionally, you can pass in the configuration eslint should extend.
643-
* Encore.enableEslint('airbnb');
641+
* Encore.enableEslintLoader('airbnb');
644642
*
645643
* // You can also pass in an object of options
646644
* // that will be passed on to the eslint-loader
647-
* Encore.enableEslint({
645+
* Encore.enableEslintLoader({
648646
* extends: 'airbnb',
649647
emitWarning: false
650648
* });
651649
*
652-
* // For a mroe advanced usage you can pass in a callback
650+
* // For a more advanced usage you can pass in a callback
653651
* // https://github.com/MoOx/eslint-loader#options
654-
* Encore.enableEslint((options) => {
652+
* Encore.enableEslintLoader((options) => {
655653
* options.extends = 'airbnb';
656-
* options.emitWarning = fasle;
654+
* options.emitWarning = false;
657655
* });
658656
*
659657
* @param {string|object|function} eslintLoaderOptionsOrCallback

lib/features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const features = {
6767
method: 'enableEslintLoader()',
6868
// eslint is needed so the end-user can do things
6969
packages: ['eslint', 'eslint-loader', 'babel-eslint', 'eslint-plugin-import'],
70-
description: 'load VUE files'
70+
description: 'Enable ESLint checks'
7171
},
7272
notifier: {
7373
method: 'enableBuildNotifications()',

lib/loaders/eslint.js

Lines changed: 0 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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)