* First iteration of xjson in monaco
* Throwaway implementation in painless lab - THIS MUST BE REVERTED
* WiP on build process for new kbn-lang package
* new @kbn/langs package and update ui-shared-deps
* Update jest config for new work files
* Update painless lab -- REVERT THIS COMMIT
* Create shared useXJson mode hook
* Final update to using the new shared useXJsonMode hook -- REVERT
* Created @kbn/monaco and share through shared deps
* always access monaco through `@kbn/monaco`
* use path.resolve to create path
* add basic readme
* remove console.log call
* remove typescript support from ui-shared-deps webpack config
* use `@kbn/babel-preset`
* include the monaco styles in the kbn-ui-shared-deps
* sort package.json
* build worker at bootstrap rather than commiting to repo
* only build worker, don't pre-bundle monaco
* fix type check errors
* remove section from readme about committed dist
* keep editor.worker.js postfix
* forgot to save update to import
* license package as apache-2.0
* Added regenerator runtime for worker bundle
* revert changes to painless lab
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Warn in Typescript when using Array.flat() or .flatMap() without polyfill
* Update ecma version provided to babel in eslint
* Update per review comments
## Summary
While working on a plugin that was just using the Kibana eslint config, I saw a stream of these messages:
> Warning: React version specified in eslint-plugin-react-settings must be a string; got “object”
Looking into our eslint config, I noticed we're using `semver.coerce` to get the version from the `package.json` file in Kibana. This looked right, except that method actually returns an object:
```js
const ver = semver.coerce('^16.8.0');
console.log(ver);
```
That produces:
```
SemVer {
options: { loose: false, includePrerelease: false },
loose: false,
raw: '16.8.0',
major: 16,
minor: 8,
patch: 0,
prerelease: [],
build: [],
version: '16.8.0' }
```
The [semver package](https://www.npmjs.com/package/semver) includes some examples where they wrap that value in `semver.valid`, which produces a string and fixes the warning.
```js
const ver = semver.valid(semver.coerce('^16.8.0'));
console.log(ver); // outputs 16.8.0
```
### So why don't we see this warning in Kibana?
I'm not sure, but I suspect it's because it's a console warning and our tooling prevents that output from showing up.
This change stops the warning output when you run eslint in my plugin though.
UPDATE: After some more digging, it looks like it's related to the version override in Kibana's eslintrc. Removing the override stops the linter from running, without the changes in this PR.
We have had `insert_final_newline = true` in our `.editorconfig` file since April 2015, but never validated it with eslint. I'm a little tired of extra changes showing up in PRs because some people use editors which respect the `.editorconfig` file and some don't, so I figured we might want to enable the rule in eslint so that the can be autofixed.
Votes requested please :)
* [kbn-plugin-generator] add eslint-plugin-jsx-a11y to plugin devDeps, specify react version in config
* [eslint/react] use semver package to coerce version range
* fix semicolons
* lint for innerHTML and family
Browser apis like innerHTML and document.write are dangerous when used
incorrectly, so we should not be using them unless we explicitly opt-out
of the linting rule on a case by case basis.
* add no-unsanitized to eslint peerDependencies
* Initial commit
* added actual config
* version 0.0.1
* version 0.0.2
* [no-const-assign] Disallow assignment to const
http://eslint.org/docs/rules/no-const-assign
* [no-redeclare] Disallow redeclaring variables
http://eslint.org/docs/rules/no-redeclare
* version 0.0.3
* [no-unused-vars]: Disallow declaration of variables that are not used in the code.
* Bump to 0.1.0.
* upgrade deps in preperation for babel6 transition
* 0.2.0-alpha1
* use yaml for readability
* 0.2.0
* update/pin peed dependency versions
* 0.2.1
* [quotes] allow template literals
This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes
* 0.2.2
* add object-curly-spacing and no-global-assign rules
* sort .eslintrc.yaml rules
* 0.3.0
* add basic react support
* 0.4.0
* Disallow using 'context' in tests
* 0.5.0
* move from .eslintrc.yaml to .eslintrc.js without .json generation (#6)
* Implement import plugin (#7)
* update deps
* include eslint-plugin-import
* Dereference import config (#8)
* reorganize existing rules into groups
* defreference eslint-plugin-import "recommended" config
Based on ea9c92c732/config/recommended.js
* 0.6.0
* set environment info for import rule
* 0.6.1
* update peerDependencies
* 0.7.0
* Move eslint-config-kibana into packages directory