mailonline / eslint-config-mailonline Goto Github PK
View Code? Open in Web Editor NEWMailOnline ESLint configuration.
License: Other
MailOnline ESLint configuration.
License: Other
Hey there. Since you released version 1.7.13
of eslint-config-canonical
, eslint-config-mailonline
throws an error. I tried a fresh install on a new project and it throws this:
ESLint couldn't find the plugin "eslint-plugin-sorting". This can happen for a couple different reasons:
I tried installing that package and in that case it works on the fresh project but in mol-fe-legal-admin it's throwing:
TypeError: Cannot read property 'prevName' of null
Since 1.7.13 of eslint-config-canonical appears to be a breaking version, can we force 1.7.12 here?
Placeholder for specific rules votations
Please ask for PR reviews
Making this issue for discussion on specific rules.
The only one that seems a bit weird to me really is babel/object-curly-spacing
- it specifically forbids syntax like { a: 1, b: 2 }
which is widespread among most major authors and companies and to me makes sense because it makes the code more readable than {a: 1, b: 2}
. I'm definitely open to hearing arguments.
And two rules that I don't feel strongly about one way or the other but that collide with the style established by the team:
func-style (Expected a function expression)
no-restricted-syntax (Using 'TemplateLiteral' is not allowed)
I understand the rationale behind them but since we currently use template literals and function declarations a lot in our code right now, it might be wise to discuss them.
npm2 doesn't use the same flat structure of npm3 so when using this preset you end up with errors like ESLint couldn't find the plugin "eslint-plugin-no-use-extend-native".
Once you install all plugin dependencies manually you get
Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
at EventEmitter.ReturnStatement (/cc/node_modules/eslint-plugin-promise/rules/no-return-wrap.js:25:28)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.enterNode (/cc/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/cc/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (/cc/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.enter (/cc/node_modules/eslint/lib/eslint.js:925:36)
at Controller.__execute (/cc/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
at Controller.traverse (/cc/node_modules/eslint/node_modules/estraverse/estraverse.js:501:28)
at Controller.Traverser.controller.traverse (/cc/node_modules/eslint/lib/util/traverser.js:36:33)
Branch | Build failing π¨ |
---|---|
Dependency | eslint-plugin-jest |
Current Version | 21.6.2 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-jest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 2 commits.
eb31a54
feat: implement valid-expect-in-promise rule (#42)
b44813a
chore(package): update semantic-release to version 12.2.2 π (#55)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hi.
As established here this plugin is using "babel-eslint": "^8.0.2"
which has a bug that causes false positives.
and because of that other projects dependant on this one are failing the build process:
Shall I make a PR upgrading the babel-eslint
version to fix this? π€
Regards.
Please use semantic commit names
master
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project β¨
Your semantic-release bot π¦π
react/jsx-indent-props
seems to require 4
characters indentation for props on jsx, should be 2
for consistency.
I'd like to start an ESLint configuration project for use in MailOnline project. Up to now, @MailOnline/mol-fe team has been using AirBnb JSCS configuration with some customisations, e.g. https://github.com/MailOnline/mol-fe-contact-form/blob/a015f67f374366ef83c0584912978b62cf0a49f9/.jscsrc#L4-L7.
A simple transition would be to extend from eslint-config-airbnb
.
However, there are several things that I do not like about AirBnb style guide:
accessor-pairs
arrow-body-style
no-braces stylebabel-eslint
. As a result, not all stage 3 features are supported (e.g. async/await
)callback-return
.comma-dangle
super
invocation using constructor-super
this
using consistent-this
func-style
The list keeps going (there are 70+ differences).
eslint-config-canonical
style is a lot more strict than eslint-config-airbnb
. It has 300+ rules that AirBnb does not bother with. It is the style that I have been maintaining for +1 year and it is used across many public and private projects.
I am proposing that eslint-config-mailonline
would extend from eslint-config-canonical
and overwrite only the rules that we disagree about. Having worked on the existing code, the only rule that I can think of is: indent
. I prefer 4 spaces, you prefer 2. This can be overwritten in the eslint-config-mailonline
config.
Please enable master protection
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.