Giter Site home page Giter Site logo

danielterwiel / prettier-eslint-webpack-plugin Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 5.0 56 KB

Webpack plugin for prettier-eslint which ESLint's settings is set to JavaScript Standard Style

JavaScript 100.00%
eslint prettier webpack-plugin webpack2

prettier-eslint-webpack-plugin's People

Contributors

danielterwiel avatar dmacdnld avatar egidius avatar tchekjunior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prettier-eslint-webpack-plugin's Issues

Upgrade to latest prettier-eslint version

Hello! Thanks for sharing this plugin. Would it be OK if it had its prettier-eslint dependency upgraded to the latest version (4.4.0)? I have submitted a pull request to do so: #2. If there are any issues with my pull request I would be happy to fix them. Thanks again!

Getting error when installing

error An unexpected error occurred: "https://registry.yarnpkg.com/prettier-eslint-webpack-plugin/-/prettier-eslint-webpack-plugin-0.1.1.tgz: invalid tar file".

I republished the module as @slightlytyler/prettier-eslint-webpack-plugin using npm publish and it works. A bit of googling points to yarn publish being the culprit, might need to republish with npm.

Doesn't support "extend" in .eslintrc?

Hi,

I'm using this plugin with a .eslintrc file with "extend" property. When I'm using prettier-eslint-cli, the format is correct. But, when I'm using this webpack plugin, the output is same as the .eslintrc file without "extend" property. When I use the standard eslint config, the output is correct. The "extend" value looks like being ignored. I have spend almost a day trying to solve this. But it still doesn't work.

Here is my plugin settings:

var PrettierEslintPlugin = require('prettier-eslint-webpack-plugin');
var eslintConfig = fs.readFileSync(path.resolve('./frontend/.eslintrc'), 'utf8');

new PrettierEslintPlugin.PrettierEslintPlugin({
  eslintConfig: eslintConfig,
  filePath: path.resolve('./frontend'),
  eslintPath: path.resolve('./node_modules/eslint'),
  prettierPath: path.resolve('./node_modules/prettier'),
  prettierOptions: {
    printWidth: 100,
    tabWidth: 2,
    singleQuote: true,
    trailingComma: 'none',
    semi: true,
    bracketSpacing: true
  }
})

And .eslintrc file:

"extends": ["airbnb"],
"env": {
  "browser": true,
  "commonjs": true,
  "es6": true,
  "jquery": true
},
"globals": {
  "window": false
},
"rules": {
  "linebreak-style": "off",
  "comma-dangle": ["error", "never"],
  "arrow-parens": ["error", "always"]
  }]
}

Is there anyone has this issue before? Thanks for any help and idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.