tclindner / eslint-config-tc Goto Github PK
View Code? Open in Web Editor NEWESLint shareable config for JavaScript projects
License: MIT License
ESLint shareable config for JavaScript projects
License: MIT License
Not sure we should do this, but I've seen a few repos doing it and it seems like it might be valuable for us. Would need to tweak the extension.
'import/no-extraneous-dependencies': ['error', {devDependencies: ['**/test/*.ts'], peerDependencies: false}],
I saw that eslint-config-airbnb-base has been updated to support eslint 7. What other dependencies do we need to see updated before we take the plunge?
- Adds the other new "recommended" rules from v24 (why don't we just use their recommendations?)
Right now we do everything in overrides, which don't support extends. We can add the jest rules so they apply to all files. What do you think?
Yea that's fine. Just seems like unnecessary maintenance.
Originally posted by @pohnemus in #219 (comment)
plugin:jest/recommended
) config to extends
section. See https://www.npmjs.com/package/eslint-plugin-jest#recommendedjest/*
rules from overrides - https://github.com/tclindner/eslint-config-tc/blob/master/index.js#L41jest
file in the rules
directory. jest/no-alias-methods
, jest/no-duplicate-hooks
, jest/no-if
, jest/no-large-snapshots
, jest/no-test-return-statement
, jest/prefer-called-with
, jest/prefer-hooks-on-top
, jest/prefer-strict-equal
, jest/prefer-to-be-null
, jest/prefer-to-be-undefined
, jest/prefer-to-contain
, jest/prefer-to-have-length
, jest/prefer-todo
, jest/require-to-throw-message
, and jest/require-top-level-describe
.I'd like to add this to our config - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-ternary.md
Link to docs: https://eslint.org/docs/rules/require-atomic-updates
Pre-reqs - peer dependencies that need to add support:
eslint-config-airbnb-base
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v24.0.0
peerDeps
on current version before releasing a new major version. https://github.com/tclindner/eslint-config-tc/releases/tag/v16.4.0Remove jest and mocha environments from config
env: {
jest: true,
mocha: true,
},
See https://eslint.org/docs/user-guide/configuring#specifying-environments
In our code: https://github.com/tclindner/eslint-config-tc/blob/master/index.js#L37
This aligns with Jest's long-term direction. Please see:
https://jestjs.io/blog/2020/05/05/jest-26#a-new-way-to-consume-jest---jestglobals
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.