Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz authored Apr 4, 2024
2 parents f75c9b2 + 9c41726 commit 14aad05
Show file tree
Hide file tree
Showing 1,075 changed files with 21,947 additions and 20,773 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
test/languages
dist/
node_modules
test/languages
website/public
website/themes
29 changes: 0 additions & 29 deletions .eslintrc

This file was deleted.

34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
extends: ['standard', 'prettier'],
rules: {
camelcase: 'off',
'multiline-ternary': 'off',
'no-labels': 'warn',
'n/no-deprecated-api': 'warn',
'no-cond-assign': 'warn',
'no-control-regex': 'warn',
'no-empty': 'warn',
'no-misleading-character-class': 'warn',
'no-mixed-operators': 'warn',
'no-new-func': 'warn',
'no-prototype-builtins': 'off',
'no-unmodified-loop-condition': 'warn',
'no-unreachable-loop': 'warn',
'no-use-before-define': 'warn',
'prefer-const': 'warn',
'valid-typeof': 'warn',
'max-len': [
'warn',
{
code: 120,
ignoreUrls: true,
ignorePattern: '(^module\\.exports|.+\\.\\./info/ini_get.+|^ //\\s+_?(returns|example))',
},
],
},
env: {
mocha: true,
browser: true,
node: true,
},
}
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [ ] Have you checked the guidelines in our [Contributing](https://github.com/locutusjs/locutus/blob/master/CONTRIBUTING.md) document?
- [ ] Have you checked the guidelines in our
[Contributing](https://github.com/locutusjs/locutus/blob/main/CONTRIBUTING.md) document?

### Description
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/locutusjs/locutus/blob/master/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/locutusjs/locutus/pulls) for the same update/change?
- [ ] Have you followed the guidelines in our
[Contributing](https://github.com/locutusjs/locutus/blob/main/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/locutusjs/locutus/pulls) for
the same update/change?

### Description
78 changes: 44 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,64 @@
name: Locutus CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
push:
branches: [main]
tags: ['*']
jobs:
ci:
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@master
- uses: actions/setup-node@v4
with:
node-version: 10.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id : yarn-cache-dir-path
run : echo "##[set-output name=dir;]$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
.yarn
website/.yarn
dist/.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: sergioramos/yarn-actions/install@master
with:
frozen-lockfile: true
- name: Install Dependencies
run: |
corepack yarn
- name: Lint
run : |
yarn lint
run: |
corepack yarn lint
- name: Build
run : |
yarn build
run: |
corepack yarn build
- name: Test
run : |
yarn test
run: |
corepack yarn test
- name: Release
if: startsWith(github.ref, 'refs/tags/')
run: |
cd dist/
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Website Build
if : github.ref == 'refs/heads/master'
run : |
yarn website:install
yarn injectweb
yarn website:build
if: github.ref == 'refs/heads/main'
run: |
corepack yarn website:install
corepack yarn injectweb
corepack yarn website:build
- name: Website Deploy 🚀
if : github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH : gh-pages # The branch the action should deploy to.
FOLDER : website/public # The folder the action should deploy.
CLEAN : true # Automatically remove deleted files from the deploy branch
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: website/public # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
35 changes: 18 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
tools/_temp/*
.DS_Store
.gitup.dat
.idea
.project
.yarn/
dist/
env.sh
nbproject
.project
.gitup.dat
node_modules/
.DS_Store
.idea
npm-debug.*
env.sh
website/vendor/bundle/
package.tgz
scripts/main.js
scripts/main.js.map
scripts/split-*.js
tools/_temp/*
website/_site/
website/node_modules/
website/vendor/bundle/
website/.jekyll-assets-cache
website/.asset-cache
website/.deploy_git
website/.jekyll-assets-cache
website/.jekyll-metadata
website/assets/bower/
website/assets/build/
website/vendor/cache/
website/.jekyll-metadata
scripts/main.js
scripts/split-*.js
scripts/main.js.map
website/public
website/db.json
website/.deploy_git
website/node_modules/
website/public
website/vendor/bundle/
website/vendor/cache/
29 changes: 29 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.DS_Store
.gitup.dat
.idea
.project
.yarn/
dist/
env.sh
nbproject
node_modules/
npm-debug.*
scripts/main.js
scripts/main.js.map
scripts/split-*.js
test/languages/
tools/_temp/*
website/_site/
website/.asset-cache
website/.deploy_git
website/.jekyll-assets-cache
website/.jekyll-metadata
website/assets/bower/
website/assets/build/
website/db.json
website/node_modules/
website/public
website/source/
website/themes
website/vendor/bundle/
website/vendor/cache/
39 changes: 39 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @type {import('prettier').Config}
* @see https://prettier.io/docs/en/options.html
*/
const prettierOptions = {
printWidth: 120,
proseWrap: 'always',
semi: false,
singleQuote: true,
useTabs: false,
jsxSingleQuote: false,
plugins: ['prettier-plugin-packagejson'],
overrides: [
{
files: '*.html',
options: {
plugins: ['@shopify/prettier-plugin-liquid'],
parser: 'liquid-html',
singleQuote: false,
liquidSingleQuote: false,
},
},
{
files: ['*.scss', '*.css'],
options: {
singleQuote: false,
printWidth: 80,
},
},
{
files: ['.github/workflows/**/*.yml'],
options: {
proseWrap: 'preserve',
},
},
],
}

module.exports = prettierOptions
17 changes: 17 additions & 0 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import remarkToc from 'remark-toc'

/**
* @typedef {import('remark-stringify').Options} Options
*/

const remarkConfig = {
/** @type {Options} */
settings: {
bullet: '-',
fences: true,
listItemIndent: 'one',
},
plugins: [[remarkToc, { maxDepth: 3 }]],
}

export default remarkConfig
26 changes: 20 additions & 6 deletions .vscode/locutus.code-workspace
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"folders": [
{
"path": ".."
}
],
"settings": {}
"folders": [
{
"path": "..",
},
],
"settings": {
"files.exclude": {
".yarn/": true,
"yarn.lock": true,
"dist/": true,
"node_modules/": true,
"website/.deploy_git/": true,
"website/.yarn": true,
"website/db.json": true,
"website/node_modules/": true,
"website/public/": true,
"website/source/{c,golang,php,python,ruby}": true,
"website/themes/": true,
},
},
}
8 changes: 8 additions & 0 deletions .vscode/locutus.code-workspace.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
compressionLevel: mixed

enableGlobalCache: true

nodeLinker: node-modules
# plugins:
# - path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
# spec: "https://mskelton.dev/yarn-outdated/v3"
Loading

0 comments on commit 14aad05

Please sign in to comment.