@chuyik/gulp-prettier-eslint

Create vinyl streams to pipe to prettier-eslint

Usage no npm install needed!

<script type="module">
  import chuyikGulpPrettierEslint from 'https://cdn.skypack.dev/@chuyik/gulp-prettier-eslint';
</script>

README

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