Skip to content

Commit

Permalink
Merge pull request #2960 from exadel-inc/epic/linting
Browse files Browse the repository at this point in the history
epic: linting packages rework + stylelint config package + initiating classic monorepo structure
  • Loading branch information
ala-n authored Mar 4, 2025
2 parents 0e34279 + 3c6cb75 commit 9527c8c
Show file tree
Hide file tree
Showing 61 changed files with 650 additions and 583 deletions.
16 changes: 8 additions & 8 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ checks:
return-statements:
config:
threshold: 6
# similar-code:
# config:
# threshold: 45
# identical-code:
# config:
# threshold: 45
similar-code:
config:
threshold: 60

exclude_patterns:
- "config/"
- "dist/"
- "features/"
- "**/node_modules/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/vendor/"
- "**/*.d.ts"
- "**/*.test.ts"
- "e2e/setup/**/*.ts"
- "e2e/**/*.ts"

- "packages/eslint-config"
- "packages/eslint-plugin"
- "packages/stylelint-config"
1 change: 1 addition & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ rules:
- deps-dev
- eslint-plugin
- eslint-config
- stylelint-config
- e2e
- ci
# Deprecated scopes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
- name: Install NPM Dependencies
run: npm ci
- name: Run ESLint Plugin Tests
run: npm run test -w eslint-plugin
run: npm run test -w packages/eslint-plugin
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ node_modules
# Build output
*.tgz
target
site/dist

eslint-plugin/dist
site/dist
e2e/.diff

# Generated surces
/modules
Expand All @@ -29,4 +29,3 @@ npm-debug.log
# Jest & Sonar
/.report
/.scannerwork
/e2e/.diff
3 changes: 1 addition & 2 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ plugins:
- package.json
- package-lock.json
- site/package.json
- eslint-config/package.json
- eslint-plugin/package.json
- packages/*/package.json
message: "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"

- - "@semantic-release/github"
Expand Down
11 changes: 4 additions & 7 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
plugins:
- stylelint-prettier
# Custom plugin to disallow absolute import paths
- ./build/import.stylelint.js
# Use LESS preprocessor
customSyntax: postcss-less

rules:
# Prettier integration
prettier/prettier:
- true
- severity: warning
extends:
- '@exadel/stylelint-config-esl'

rules:
# Disallow unknown at-rules
at-rule-no-unknown: true
# Warn about empty selectors
Expand Down Expand Up @@ -73,7 +70,7 @@ rules:

overrides:
# Demo site pages sources
- files: site/**/*.{css,less}
- files: ['site/**/*.{css,less}']
rules:
# Warn about duplicate properties within declaration blocks
declaration-block-no-duplicate-properties:
Expand Down
20 changes: 10 additions & 10 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ESL codebase is written using TypeScript and LESS CSS-preprocessor.

ESL uses the following tools to keep codebase quality
- ESLint to lint scripts
- Own ESLint shared configuration (see [eslint-config](../eslint-config) sub-package)
- Own ESLint shared configuration (see [eslint-config](../packages/eslint-config) sub-package)
- StyleLint to lint styles
- Jest to run unit tests
- CommitLint to check commit message format
Expand Down Expand Up @@ -112,15 +112,15 @@ ESL project consists of the following directories:
- [🔧 tsconfig.json](../site/tsconfig.json) - TS config for demo pages scripts
- [🔧 webpack.config.js](../site/webpack.config.js) - webpack build file for demo pages


- [📁 eslint-plugin](../eslint-plugin) - sub-package root for ESL ESLint plugin
- [📁 src](../eslint-plugin/src) - ESLint plugin sources
- [📁 test](../eslint-plugin/test) - ESLint plugin tests

- [📁 eslint-config](../eslint-config) - sub-package root for ESL ESLint shared configuration
- [📁 rules](../eslint-config/rules) - ESLint shared configuration rule sets
- [📄 index.js](../eslint-config/index.js) - ESLint shared configuration main file

- [📁 packages](../packages) - ESL monorepo sub-packages
- [📁 eslint-plugin](../packages/eslint-plugin) - sub-package root for ESL ESLint plugin
- [📁 src](../packages/eslint-plugin/src) - ESLint plugin sources
- [📁 test](../packages/eslint-plugin/test) - ESLint plugin tests
- [📁 eslint-config](../packages/eslint-config) - sub-package root for ESL ESLint shared configuration
- [📁 rules](../packages/eslint-config/rules) - ESLint shared configuration rule sets
- [📄 index.js](../packages/eslint-config/index.js) - ESLint shared configuration main file
- [📁 stylelint-config](../packages/stylelint-config) - sub-package root for ESL StyleLint shared configuration
- [📄 index.js](../packages/stylelint-config/index.js) - StyleLint shared configuration main file

- [📁 build](../build) - library common build scripts
- [📁 linting](../linting) - ES Lint rule-sets
Expand Down
37 changes: 0 additions & 37 deletions eslint-config/index.js

This file was deleted.

139 changes: 0 additions & 139 deletions eslint-config/rules/eslint.config.codestyle.js

This file was deleted.

15 changes: 0 additions & 15 deletions eslint-config/rules/eslint.config.editorconfig.js

This file was deleted.

12 changes: 0 additions & 12 deletions eslint-config/rules/eslint.config.language.js

This file was deleted.

11 changes: 0 additions & 11 deletions eslint-config/rules/eslint.config.tsdoc.js

This file was deleted.

10 changes: 5 additions & 5 deletions eslint.config.ignore.js → eslint.config.ignore.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = [
export default [
{
ignores: [
// Common configuration
Expand All @@ -15,13 +15,13 @@ module.exports = [
'/polyfills/**',
// Site output
'/site/dist/**',
// ESL ESLint Plugin output
'/eslint-plugin/dist/**',
// ESL ESLint Plugin files
'/packages/eslint-plugin/**',
// ESL ESLint Config files
'/eslint-config/**',
'/packages/eslint-config/**',
// E2E tests commons
'e2e/reporters/**',
'e2e/transformer/**',
]
}
]
];
Loading

0 comments on commit 9527c8c

Please # to comment.