mirror of
				https://github.com/HorlogeSkynet/thunderbird-user.js.git
				synced 2025-11-04 07:15:25 +01:00 
			
		
		
		
	Replaces Acorn over Travis CI by ESLint over (Microsoft) GitHub Actions
> See #11, Acorn was great but not sufficient for Mozilla's libPref syntax...
This commit is contained in:
		
							
								
								
									
										45
									
								
								.eslintrc.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								.eslintrc.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
%YAML 1.2
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
root: true
 | 
			
		||||
 | 
			
		||||
extends: 'eslint:recommended'
 | 
			
		||||
 | 
			
		||||
globals:
 | 
			
		||||
  # From <https://searchfox.org/mozilla-central/rev/c938c7416c633639a5c8ce4412be586eefb48005/modules/libpref/parser/src/lib.rs#296>
 | 
			
		||||
  pref: true
 | 
			
		||||
  user_pref: true
 | 
			
		||||
  sticky: true
 | 
			
		||||
  locked: true
 | 
			
		||||
  sticky_pref: true
 | 
			
		||||
 | 
			
		||||
rules:
 | 
			
		||||
  # Expect a semicolon after each statement.
 | 
			
		||||
  semi:
 | 
			
		||||
    - "error"
 | 
			
		||||
    - "always"
 | 
			
		||||
    -
 | 
			
		||||
      omitLastInOneLineBlock: false
 | 
			
		||||
 | 
			
		||||
  # As internal code style, don't allow tabulation.
 | 
			
		||||
  no-tabs: "error"
 | 
			
		||||
  # ... nor trailing spaces !
 | 
			
		||||
  no-trailing-spaces: "error"
 | 
			
		||||
 | 
			
		||||
  # Expect only double-quoted strings.
 | 
			
		||||
  quotes:
 | 
			
		||||
    - "error"
 | 
			
		||||
    - "double"
 | 
			
		||||
 | 
			
		||||
  # Don't allow whitespace before semicolons.
 | 
			
		||||
  semi-spacing:
 | 
			
		||||
    - "error"
 | 
			
		||||
    -
 | 
			
		||||
      before: false
 | 
			
		||||
 | 
			
		||||
  # Don't allow irregular whitespace characters in our sheet.
 | 
			
		||||
  no-irregular-whitespace:
 | 
			
		||||
    - "error"
 | 
			
		||||
    -
 | 
			
		||||
      skipStrings: false
 | 
			
		||||
      skipComments: false
 | 
			
		||||
							
								
								
									
										17
									
								
								.github/workflows/linting.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/linting.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
---
 | 
			
		||||
name: Linting
 | 
			
		||||
 | 
			
		||||
on: [push, pull_request]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    name: Run ESLint on user.js
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      - uses: actions/setup-node@v1
 | 
			
		||||
 | 
			
		||||
      - run: npm install -g eslint
 | 
			
		||||
      - run: eslint user.js
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
language: node_js
 | 
			
		||||
node_js:
 | 
			
		||||
  - 'node'
 | 
			
		||||
 | 
			
		||||
before_script:
 | 
			
		||||
  - npm install -g acorn
 | 
			
		||||
script:
 | 
			
		||||
  - acorn --silent user.js
 | 
			
		||||
		Reference in New Issue
	
	Block a user