J. Ryan Stinnett
6dca8ac460
Switch to new Babel lint config
...
This also adjusts the TypeScript project lint config to cover *.ts test files
too.
2021-05-28 11:39:06 +01:00
J. Ryan Stinnett
fbb741ab10
Switch to new Babel linting config
2021-05-27 17:49:35 +01:00
J. Ryan Stinnett
102704e91a
Migrate to eslint-plugin-matrix-org
...
This migrates to the new plugin form of our custom ESLint configs. As part of
this, some packages are de-duplicated, configs streamlined, etc.
2021-04-13 11:00:41 +01:00
J. Ryan Stinnett
212b6c3a0f
Resolve linting errors after upgrades
2021-01-20 13:54:45 +00:00
J. Ryan Stinnett
09bd91a588
Enforce logger module via lint rules
...
This adds lint rules (and fixes various errors) to ensure we use the `logger`
intermediary module, rather than accessing the console directly.
2020-10-01 14:28:24 +01:00
Michael Telatynski
66237e1ea6
Fix eslint ts override tsx matching
2020-08-29 01:10:08 +01:00
J. Ryan Stinnett
9d25848a21
Remove unused Jest lint plugin
2020-07-29 11:55:50 +01:00
Jorik Schellekens
a9c3aee447
Revert quotes change in ts
2020-07-28 14:16:46 +01:00
Jorik Schellekens
72675f7266
Lint ts
2020-07-21 10:33:16 +01:00
Jorik Schellekens
c68d135ae8
Use new eslint
2020-07-20 21:48:28 +01:00
Michael Telatynski
fd58957b06
migrate to jest from mocha+expect+istanbul
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2019-11-20 19:52:50 +00:00
J. Ryan Stinnett
47a8d3e50a
Disable guard-for-in rule
...
The Google code style config for ESLint turns on `guard-for-in` to require
for-in loops to check own properties. This makes it annoying to iterate objects,
and we seem to disable the rule by line comments when it comes up anyway, so
this just disables it globally.
2019-05-31 16:36:54 +01:00
J. Ryan Stinnett
761806c678
Add support for class properties
...
This enables compiler and linting features to allow class properties like we do
in the React SDK.
2019-05-13 13:52:37 +01:00
David Baker
17e2cd755d
Make linting rules more consistent
...
* Put back babel-eslint for class-properties
* Allow arrow functions without params
This makes the style more consistent with react-sdk.
NB. The line lengths are still inconsistent but it's not clear which
way to go on that yet.
2019-02-05 11:58:53 +00:00
David Baker
68bb8182e4
Update ESLint
...
* Bump version
* Add a couple of rules to match our existing precedent
* Fix a few genuine lint errors
* Ignore a guard-for-in (not sure why eslint doesn't like this?)
* Update max warnings
2019-01-10 10:42:34 +00:00
Richard van der Hoff
17364e72ec
Add es6 to eslint environments
2017-09-07 10:29:27 +01:00
David Baker
ca618f2bf2
Allow single line brace-style
...
As we sometimes use (x) => {foo = x;}, especially for react
components, but probably no reason not to allow it generally.
2017-01-23 14:18:09 +00:00
David Baker
a09329949a
Make comma dangle an error
...
& put max warnings back down
2017-01-23 10:18:22 +00:00
David Baker
007848c42e
Turn on comma-dangle for function calls
...
Our code style mandates this, but it's not the default.
Also use the babel-eslint parser because the standard one doesn't
support dangling commas on functions.
2017-01-20 12:42:57 +00:00
David Baker
80129e7483
Fix last prefer-const, decrease max warnings
...
and make prefer-const an error
2017-01-19 18:24:28 +00:00
David Baker
aa4ffc7bda
Add prefer-const
...
Our code style says we prefer consts, so add it to the linter.
2017-01-18 15:53:08 +00:00
David Baker
4ab261b89f
Add eslint:recommends
...
Turn off / tweak some options from it. Fix a double-definition.
Add an eslint config to the spec directory to tell it about the
jasmine magic globals.
2017-01-12 15:05:42 +00:00
David Baker
e057956ede
Add google eslint rules as a base
...
Remove some we don't care about. Set some other ones we do care
about but don't currently adhere to to warn. Set the max warnings
threshold to the current number of warnings, so we don't introduce
more of them. Fix a bunch of legit lint errors and add exceptions
to various places in the test code that does funny things with
'this'.
2017-01-12 14:35:58 +00:00
David Baker
543b9cf0ce
Run lint on prepublish, not build
...
and make everything errors, so now you can do local builds with
lint failures, but CI will fail and you can't release.
2017-01-12 12:57:24 +00:00
David Baker
ff723980ac
Add exceptions to eslintrc for JSDoc
...
To allow things we've been OK about previously
2017-01-12 11:26:17 +00:00
David Baker
0dfd60ad5e
Merge compile target into build
2017-01-11 19:02:25 +00:00
David Baker
9b5cb3a631
Update build process for ES6
...
* Make npm run build run npm compile (it needs the output)
* Switch to ESlint so we can actually use ES6 without the linter
crying.
2017-01-11 18:11:47 +00:00