@o2team/gulp-prettier-eslint

3.0.1 • Public • Published

Gulp Prettier Eslint Build Status

A Gulp plugin which allows the users to use prettier-eslint.

Install

yarn add @o2team/gulp-prettier-eslint --dev

Usage

Simply pipe the input, and pass in arguments that you would to the regular format function.

const gulp = require('gulp');
const format = require('@o2team/gulp-prettier-eslint');

gulp.task('default', () => {
  return gulp.src('*.js')
    .pipe(format({ 
      eslintConfig: {
        parserOptions: {
          ecmaVersion: 7
        },
        rules: {
          semi: ["error", "never"]
        }
      },
      prettierOptions: {
        bracketSpacing: true
      },
      fallbackPrettierOptions: {
        singleQuote: false
      }
     }))
    .pipe(gulp.dest('./dist'));
});

API

format([formatOptions])

formatOptions

Type: Object

Consult the prettier-eslint options.

Donation

If you find this project useful, you can buy us a cup of coffee:


Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:

Contributors

chuyik
chuyik

Package Sidebar

Install

npm i @o2team/gulp-prettier-eslint

Weekly Downloads

0

Version

3.0.1

License

MIT

Unpacked Size

5.08 kB

Total Files

5

Last publish

Collaborators

  • booxood
  • chuyik
  • koppt
  • mamboer