Skip to content

Commit

Permalink
reverting tsconfig, precommit and github action
Browse files Browse the repository at this point in the history
Signed-off-by: kohinoor98 <[email protected]>
  • Loading branch information
kohinoor98 committed Nov 15, 2023
1 parent 4a0fada commit 1120c12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 78 deletions.
27 changes: 5 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

const LICENSE_HEADER = `
/*
* Copyright OpenSearch Contributors
Expand All @@ -10,28 +15,6 @@ module.exports = {
extends: ["@elastic/eslint-config-kibana", "plugin:@elastic/eui/recommended"],
rules: {
// "@osd/eslint/require-license-header": "off"
"import/no-default-export": "off",
"@typescript-eslint/naming-convention": [
"error",
{
selector: "default",
format: ["camelCase", "UPPER_CASE", "PascalCase", "snake_case"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
],
"@osd/eslint/no-restricted-paths": [
"error",
{
basePath: __dirname,
zones: [
{
target: ["(public|server)/**/*"],
from: ["../../packages/**/*", "packages/**/*"],
},
],
},
],
},
overrides: [
{
Expand Down
55 changes: 6 additions & 49 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,21 @@
name: Link Checker and ESLint
name: Link Checker
on:
push:
branches: [main]
branches: [ main ]
pull_request:
branches: [main]
branches: [ main ]

jobs:
lint-and-link-check:
linkchecker:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2


# Enable longer filenames for windows
- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true
- name: Checkout OpenSearch-Dashboards
uses: actions/checkout@v2
with:
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: "./OpenSearch-Dashboards/.nvmrc"
registry-url: "https://registry.npmjs.org"
- name: Install Yarn
# Need to use bash to avoid having a windows/linux specific step
shell: bash
run: |
YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn")
echo "Installing yarn@$YARN_VERSION"
npm i -g yarn@$YARN_VERSION
- run: node -v
- run: yarn -v
- name: Checkout Index Management Dashboards plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
- name: Bootstrap plugin/OpenSearch-Dashboards
run: |
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
yarn osd bootstrap
- name: Install Dependencies
run: yarn install

- name: Run ESLint
run: yarn eslint:run
working-directory: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin

- uses: actions/checkout@v2
- name: lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@master
with:
args: --accept=200,403,429 --exclude=localhost "**/*.html" "**/*.md" "**/*.txt" "**/*.json"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}
8 changes: 1 addition & 7 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"*.{ts,tsx}": [
"npx eslint --fix",
"prettier --write"
],
"*.{js,jsx,json,css,md}": [
"prettier --write"
]
"*.{ts,tsx,js,jsx,json,css,md}": ["prettier --write", "git add"]
}

0 comments on commit 1120c12

Please sign in to comment.