mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Chore: fix canvas linting (#25024)
This fixes `yarn run lint` from within the Canvas plugin path. - Point to the correct eslint config file - Use absolute path for `packageDir` - Remove extraneous `packageDir` settings
This commit is contained in:
parent
cd274558d6
commit
f6fd86aa4d
2 changed files with 12 additions and 19 deletions
29
.eslintrc.js
29
.eslintrc.js
|
@ -348,6 +348,17 @@ module.exports = {
|
|||
/**
|
||||
* Canvas overrides
|
||||
*/
|
||||
{
|
||||
files: ['x-pack/plugins/canvas/*', 'x-pack/plugins/canvas/**/*'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{
|
||||
packageDir: resolve(__dirname, 'x-pack'),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['x-pack/plugins/canvas/**/*'],
|
||||
plugins: ['prettier'],
|
||||
|
@ -406,17 +417,6 @@ module.exports = {
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['x-pack/plugins/canvas/*', 'x-pack/plugins/canvas/**/*'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{
|
||||
packageDir: './x-pack/',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'x-pack/plugins/canvas/gulpfile.js',
|
||||
|
@ -431,7 +431,6 @@ module.exports = {
|
|||
{
|
||||
devDependencies: true,
|
||||
peerDependencies: true,
|
||||
packageDir: './x-pack/',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -440,12 +439,6 @@ module.exports = {
|
|||
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*'],
|
||||
globals: { canvas: true, $: true },
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{
|
||||
packageDir: './x-pack/',
|
||||
},
|
||||
],
|
||||
'import/no-unresolved': [
|
||||
'error',
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"scripts": {
|
||||
"kbn": "node ../../../scripts/kbn",
|
||||
"start": "../../node_modules/.bin/gulp canvas:dev",
|
||||
"lint": "node ../../../scripts/eslint '*.js' '__tests__/**/*.js' 'tasks/**/*.js' 'server/**/*.js' 'common/**/*.js' 'public/**/*.{js,jsx}' 'canvas_plugin_src/**/*.{js,jsx}' --ignore-pattern 'canvas_plugin_src/lib/flot-charts/**/*' --ignore-pattern 'common/lib/grammar.js' --ignore-pattern 'canvas_plugin/**/*'",
|
||||
"lint": "node ../../../scripts/eslint -c ../../../.eslintrc.js '*.js' '__tests__/**/*.js' 'tasks/**/*.js' 'server/**/*.js' 'common/**/*.js' 'public/**/*.{js,jsx}' 'canvas_plugin_src/**/*.{js,jsx}' --ignore-pattern 'canvas_plugin_src/lib/flot-charts/**/*' --ignore-pattern 'common/lib/grammar.js' --ignore-pattern 'canvas_plugin/**/*'",
|
||||
"test": "../../node_modules/.bin/gulp canvas:test",
|
||||
"test:common": "../../node_modules/.bin/gulp canvas:test:common",
|
||||
"test:server": "../../node_modules/.bin/gulp canvas:test:server",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue