Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] elastic-eslint-config-kibana dependency #253

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions packages/elastic-eslint-config-kibana/jest.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const RESTRICTED_GLOBALS = require('./restricted_globals');
const RESTRICTED_MODULES = { paths: ['gulp-util'] };

Expand All @@ -10,13 +29,7 @@ module.exports = {
files: ['**/*.js'],
parser: require.resolve('babel-eslint'),

plugins: [
'mocha',
'babel',
'import',
'no-unsanitized',
'prefer-object-spread',
],
plugins: ['mocha', 'babel', 'import', 'no-unsanitized', 'prefer-object-spread'],

settings: {
'import/resolver': {
Expand All @@ -41,12 +54,12 @@ module.exports = {

rules: {
'block-scoped-var': 'error',
camelcase: [ 'error', { properties: 'never', allow: ['^UNSAFE_'] } ],
camelcase: ['error', { properties: 'never', allow: ['^UNSAFE_'] }],
'consistent-return': 'off',
'dot-notation': [ 'error', { allowKeywords: true } ],
eqeqeq: [ 'error', 'allow-null' ],
'dot-notation': ['error', { allowKeywords: true }],
eqeqeq: ['error', 'allow-null'],
'guard-for-in': 'error',
'new-cap': [ 'error', { capIsNewExceptions: [ 'Private' ] } ],
'new-cap': ['error', { capIsNewExceptions: ['Private'] }],
'no-bitwise': 'off',
'no-caller': 'error',
'no-cond-assign': 'off',
Expand Down Expand Up @@ -77,20 +90,20 @@ module.exports = {
'no-unsanitized/method': 'error',
'no-unsanitized/property': 'error',
'no-unused-expressions': 'off',
'no-unused-vars': [ 'error' ],
'no-use-before-define': [ 'error', 'nofunc' ],
'no-unused-vars': ['error'],
'no-use-before-define': ['error', 'nofunc'],
'no-var': 'error',
'no-with': 'error',
'one-var': [ 'error', 'never' ],
'one-var': ['error', 'never'],
'prefer-const': 'error',
strict: [ 'error', 'never' ],
strict: ['error', 'never'],
'valid-typeof': 'error',
yoda: 'off',

'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',

'import/no-unresolved': [ 'error', { 'amd': true, 'commonjs': true } ],
'import/no-unresolved': ['error', { amd: true, commonjs: true }],
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
Expand All @@ -101,7 +114,7 @@ module.exports = {
'import/no-dynamic-require': 'error',

'prefer-object-spread/prefer-object-spread': 'error',
}
},
},
]
],
};
37 changes: 37 additions & 0 deletions packages/opensearch-eslint-config-opensearch-dashboards/jest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

module.exports = {
overrides: [
{
files: ['**/*.{test,test.mocks,mock}.{js,mjs,ts,tsx}', '**/__mocks__/**/*.{js,mjs,ts,tsx}'],
plugins: ['jest'],

env: {
jest: true,
},

rules: {
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'import/order': 'off',
},
},
],
};
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
const semver = require('semver')
const PKG = require('../../package.json')
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const semver = require('semver');
const PKG = require('../../package.json');

module.exports = {
plugins: [
'react',
'react-hooks',
'jsx-a11y',
],
plugins: ['react', 'react-hooks', 'jsx-a11y'],

parserOptions: {
ecmaFeatures: {
jsx: true
}
jsx: true,
},
},

settings: {
Expand Down Expand Up @@ -66,4 +81,4 @@ module.exports = {
'react/prefer-stateless-function': ['error', { ignorePureComponents: true }],
'react/no-unescaped-entities': 'error',
},
}
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// copied from https://github.com/facebookincubator/create-react-app/blob/2e82ebb3371731a5c4e346f310848ddb23fd0976/packages/eslint-config-react-app/index.js#L24
module.exports = [
'addEventListener',
Expand Down
Loading