New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit #1

Merged
merged 1 commit into from Jan 25, 2019

Conversation

Projects
None yet
3 participants
@PierreRambaud
Copy link
Contributor

PierreRambaud commented Jan 23, 2019

Based on https://github.com/PrestaShop/Prestashop configuration.

@Vinceveve
Copy link

Vinceveve left a comment

Main problem we are in es5 server side
Or we need to use babel or start with --experimental-feature=true

What can we choose ?

@xGouley any wish ?

module.exports = {
env: {
browser: true,
es6: true,

This comment has been minimized.

@Vinceveve

Vinceveve Jan 24, 2019

We are in es5 server side

This comment has been minimized.

@PierreRambaud

PierreRambaud Jan 24, 2019

Author Contributor

You are able to override your own configuration:

// http://eslint.org/docs/user-guide/configuring
module.exports = {
  extends: 'prestashop',
  env: {
    es6: false,
    es5: true,
  }
};

This comment has been minimized.

@PierreRambaud

PierreRambaud Jan 24, 2019

Author Contributor

It also working with rules if you project have a rule you really don't want.

@xGouley

This comment has been minimized.

Copy link
Member

xGouley commented Jan 25, 2019

Main problem we are in es5 server side
Or we need to use babel or start with --experimental-feature=true

What can we choose ?

@xGouley any wish ?

No babel please ! I had to use it. Unstable, too much breaking features at each upgrade, security breachs each time... It's a unnecessary layer, too complex.
We have sufficient syntaxes with es5...

@Vinceveve

This comment has been minimized.

Copy link

Vinceveve commented Jan 25, 2019

I agree with you, let's override with es5 in our project :)

Otherwise everything is ok for you ?

@xGouley

This comment has been minimized.

Copy link
Member

xGouley commented Jan 25, 2019

Tower has rules I don't look before:
https://github.com/PrestaShop/tower/blob/master/.eslintrc.json
and server side:
https://github.com/PrestaShop/tower/blob/master/api/.eslintrc.json

Very strange, but there is a lot of things we shutdowned to be able to code properly (too much restrictions on the base set)

@PierreRambaud

This comment has been minimized.

Copy link
Contributor Author

PierreRambaud commented Jan 25, 2019

Never had problems with babel and working in es6 since at least 2 years in back and front side 😮
But anyway, this is just a template base, based on airbnb which is used by many Js developpers.
The base must have restrictions and you are still able to override and/or add/remove rules.
It is like using PSR2 for PHP, rubocop for Ruby, or flake8 for Python 😄

We need something strict for all projects, and of course projects will adapt.

Don't hesitate if you need an eye for a babel configuration 😃

@PierreRambaud

This comment has been minimized.

Copy link
Contributor Author

PierreRambaud commented Jan 25, 2019

Have the go from @xGouley for a first version.

@PierreRambaud PierreRambaud merged commit f8939c9 into master Jan 25, 2019

@PierreRambaud PierreRambaud deleted the initial-commit branch Jan 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment