Skip to content

Commit

Permalink
Merge pull request #2562 from iptv-org/freearhey-patch-5
Browse files Browse the repository at this point in the history
Patch 2025.01.1
  • Loading branch information
BellezaEmporium authored Jan 8, 2025
2 parents 95e9e67 + c436e75 commit 8a5ec2c
Show file tree
Hide file tree
Showing 180 changed files with 7,332 additions and 7,171 deletions.
39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: tj-actions/changed-files@v45
id: files
with:
since_last_remote_commit: true
files_yaml: |
js:
- tests/**/*.{js,ts}
- scripts/**/*.{js,ts}
- sites/**/*.{js,ts}
channels:
- sites/**/*.channels.xml
- uses: actions/setup-node@v4
if: ${{ !env.ACT && (steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true') }}
with:
node-version: 22
cache: 'npm'
- name: install dependencies
if: steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true'
run: SKIP_POSTINSTALL=1 npm install
- name: check changed js-files
if: steps.files.outputs.js_any_changed == 'true'
run: |
npx eslint ${{ steps.files.outputs.js_all_changed_files }}
- name: check changed *.channels.xml
if: steps.files.outputs.channels_any_changed == 'true'
run: |
npm run channels:lint -- ${{ steps.files.outputs.channels_all_changed_files }}
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm run channels:lint
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
tabWidth: 2,
useTabs: false,
endOfLine: 'lf',
endOfLine: 'crlf',
semi: false,
singleQuote: true,
printWidth: 100,
Expand Down
1 change: 1 addition & 0 deletions .sites/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_table.md
207 changes: 0 additions & 207 deletions .sites/_table.md

This file was deleted.

8 changes: 4 additions & 4 deletions .sites/template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sites

<!-- prettier-ignore -->
#include "./.sites/_table.md"
# Sites

<!-- prettier-ignore -->
#include "./.sites/_table.md"
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ For scripts to work, you must have [Node.js](https://nodejs.org/en) installed on

To run scripts use the `npm run <script-name>` command.

- `act:check`: allows to test the [check](https://github.com/iptv-org/iptv/blob/master/.github/workflows/check.yml) workflow locally. Depends on [nektos/act](https://github.com/nektos/act).
- `act:update`: allows to test the [update](https://github.com/iptv-org/iptv/blob/master/.github/workflows/update.yml) workflow locally. Depends on [nektos/act](https://github.com/nektos/act).
- `api:load`: downloads the latest channels data from the [iptv-org/api](https://github.com/iptv-org/api).
- `api:generate`: generates a JSON file with all channels for the [iptv-org/api](https://github.com/iptv-org/api) repository.
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'),
{
plugins: {
'@typescript-eslint': typescriptEslint
},

languageOptions: {
globals: {
...globals.node,
...globals.jest
},

parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},

rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-case-declarations': 'off',
'linebreak-style': ['error', 'windows'],

quotes: [
'error',
'single',
{
avoidEscape: true
}
],

semi: ['error', 'never']
}
}
]
Loading

0 comments on commit 8a5ec2c

Please sign in to comment.