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

Removed BrowserSync from depenencies #834

Merged
merged 5 commits into from
Jul 5, 2024
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
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [12.1.5]

### Removed
- Removed BrowserSync dependencies.
- Removed Babel dependencies.

### Changed
- Updated ES lint config and added required dependencies for a new setup.

iruzevic marked this conversation as resolved.
Show resolved Hide resolved
## [12.1.4]

### Fixed
Expand Down Expand Up @@ -1095,6 +1104,7 @@ Follow this migration script in order for you project to work correctly with the

[Unreleased]: https://github.com/infinum/eightshift-frontend-libs/compare/master...HEAD

[12.1.5]: https://github.com/infinum/eightshift-frontend-libs/compare/12.1.4...12.1.5
[12.1.4]: https://github.com/infinum/eightshift-frontend-libs/compare/12.1.3...12.1.4
[12.1.3]: https://github.com/infinum/eightshift-frontend-libs/compare/12.1.2...12.1.3
[12.1.2]: https://github.com/infinum/eightshift-frontend-libs/compare/12.1.1...12.1.2
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import linterConfig from './linters/base.config.mjs';

export default linterConfig;
79 changes: 79 additions & 0 deletions linters/base.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// import react from 'eslint-plugin-react';
// import reactHooks from 'eslint-plugin-react-hooks';
import stylistic from '@stylistic/eslint-plugin-js';
import globals from 'globals';

export default [
{
ignores: ['**/dist/', 'public/'],
},
{
files: ['**/*.js', '**/*.jsx'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
wp: true,
...globals.serviceworker,
...globals.browser,
},
},
plugins: {
// react,
// 'react-hooks': reactHooks,
'@stylistic/js': stylistic,
},
rules: {
'newline-before-return': 'error',
'no-constant-binary-expression': 'error',
'no-implicit-coercion': 'error',
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'no-nested-ternary': 'error',
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'no-void': 'error',
'@stylistic/js/semi': 'error',
'max-len': [
'error',
{
code: 180,
comments: 500,
ignorePattern: '^import .*',
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
},
],
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: '*',
next: ['return', 'if', 'switch', 'for', 'while', 'try', 'throw'],
},
{
blankLine: 'any',
prev: ['const', 'let', 'var', 'import'],
next: ['const', 'let', 'var', 'import'],
},
],
// React-specific.
// Note: React rules are temporarily disabled until the plugin gets full compatibility with ESLint 9.
// 'consistent-return': 'warn',
// 'no-param-reassign': 'warn',
// 'react-hooks/rules-of-hooks': 'error',
// // 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useSafeLayoutEffect|useUpdateEffect)' }],
// 'react/prop-types': ['error', { skipUndeclared: true }],
// 'react/react-in-jsx-scope': 'off',
// 'react/self-closing-comp': ['warn', { component: true, html: true }],
// 'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
// settings: {
// react: {
// version: '18',
// },
// },
}
];
32 changes: 0 additions & 32 deletions linters/eslint.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions linters/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import baseConfig from './base.config.mjs';
import ignoreGitignored from './ignore-gitignored.mjs';

export default [ignoreGitignored, ...baseConfig];
9 changes: 9 additions & 0 deletions linters/ignore-gitignored.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import path from 'node:path';
import { includeIgnoreFile } from '@eslint/compat';
import { fileURLToPath } from 'node:url';

const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const gitignorePath = path.resolve(dirname, '.gitignore');

export default [includeIgnoreFile(gitignorePath)];
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eightshift/frontend-libs",
"version": "12.1.4",
"version": "12.1.5",
"description": "A collection of useful frontend utility modules. powered by Eightshift",
"author": {
"name": "Eightshift team",
Expand Down Expand Up @@ -32,17 +32,13 @@
"homepage": "https://github.com/infinum/eightshift-frontend-libs#readme",
"license": "MIT",
"dependencies": {
"@babel/cli": "^7.24.6",
"@babel/core": "^7.24.6",
"@babel/eslint-parser": "^7.24.6",
"@babel/eslint-plugin": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"@babel/preset-react": "^7.24.6",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@eslint/compat": "^1.1.0",
"@infinumjs/eslint-config-react-js": "^3.5.0",
"@stylistic/eslint-plugin-js": "^2.3.0",
"@stylistic/stylelint-plugin": "^2.1.2",
"@swc/core": "^1.5.25",
"@uidotdev/usehooks": "^2.4.1",
Expand All @@ -52,8 +48,6 @@
"@wordpress/dom-ready": "^4.0.0",
"autoprefixer": "^10.4.19",
"babel-loader": "^9.1.3",
"browser-sync": "^3.0.2",
"browser-sync-v3-webpack-plugin": "^0.1.0",
"clean-webpack-plugin": "^4.0.0",
"core-js": "^3.37.1",
"css-loader": "^7.1.2",
Expand All @@ -64,6 +58,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"file-loader": "^6.2.0",
"framer-motion": "^11.2.10",
"globals": "^15.8.0",
"husky": "^9.0.11",
"import-glob": "^1.5.0",
"just-camel-case": "^6.2.0",
Expand Down
Loading